19 Commits

Author SHA256 Message Date
fc125ac3ad Accepting request 1326933 from devel:libraries:c_c++
- Update to version 2.0.2
  * Fixed a typo in CMOCKA_NO_DEPRECATION_WARNINGS

OBS-URL: https://build.opensuse.org/request/show/1326933
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cmocka?expand=0&rev=26
2026-01-13 20:12:21 +00:00
0e81953f48 Update to version 2.0.2
* Fixed a typo in CMOCKA_NO_DEPRECATION_WARNINGS

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmocka?expand=0&rev=73
2026-01-13 06:56:37 +00:00
ec148451f8 Accepting request 1324715 from devel:libraries:c_c++
- Update to version 2.0.1
  * Option to disable deprecation warnings via `CMOCKA_NO_DEPRECATION_WARNINGS`
  * Documentation theme is now downloaded during `make docs` instead of at
  * configure time
  * Fixed const-correctness issues throughout the library
- This release helps to address boo#1255045
- Fix obsoleting libcmocka-cmake
- Update to version 2.0.0
  o Added
    * Test Filtering
      - Environment variable support for test filtering:
      - `CMOCKA_TEST_FILTER`: Filter tests to run by pattern
      - `CMOCKA_SKIP_FILTER`: Filter tests to skip by pattern
      - Improved `cmocka_set_test_filter()` and `cmocka_set_skip_filter()`
        functions
    * Output Formats
      - **TAP 14 support**: Updated Test Anything Protocol output to
        version 14 with YAML diagnostics
      - YAML-formatted error messages with proper indentation
      - `severity` field for distinguishing failures from errors
      - Improved SKIP directive format
    * Type-Safe Assertions and Mocking
      - Type-safe assertion macros for integers:
      - `assert_int_equal()` / `assert_int_not_equal()`
      - `assert_uint_equal()` / `assert_uint_not_equal()`
      - `assert_int_in_range()` / `assert_int_not_in_range()`
      - `assert_uint_in_range()` / `assert_uint_not_in_range()`
      - `assert_int_in_set()` / `assert_int_not_in_set()`
      - `assert_uint_in_set()` / `assert_uint_not_in_set()`
      - Type-safe mocking macros for different types:
      - `will_return_int()`, `will_return_uint()`,
        `will_return_float()`, `will_return_double()`,
        `will_return_ptr()`
      - `will_return_*_count()`, `will_return_*_always()`,
        `will_return_*_maybe()` variants
      - `will_set_parameter_int()`, `will_set_parameter_uint()`,
        `will_set_parameter_float()`, `will_set_parameter_double()`,
        `will_set_parameter_ptr()`
      - `will_set_parameter_*_count()`,
        `will_set_parameter_*_always()`,
        `will_set_parameter_*_maybe()` variants
      - `mock_int()`, `mock_uint()`, `mock_float()`, `mock_double()`,
        `mock_ptr()`
      - Type-safe expect macros:
      - `expect_int_value()` / `expect_uint_value()`
      - `expect_int_not_value()` / `expect_uint_not_value()`
      - `expect_int_in_range()` / `expect_uint_in_range()`
      - `expect_int_not_in_range()` / `expect_uint_not_in_range()`
      - `expect_int_in_set()` / `expect_uint_in_set()`
      - `expect_int_not_in_set()` / `expect_uint_not_in_set()`
      - `expect_check_int()` / `expect_check_uint()`
    * Float and Double Support
      - Floating-point assertion macros:
      - `assert_float_equal()` / `assert_float_not_equal()`
      - `assert_double_equal()` / `assert_double_not_equal()` with
        epsilon parameter
      - `assert_float_in_range()` / `assert_float_not_in_range()`
      - `assert_float_in_set()` / `assert_float_not_in_set()`
      - Floating-point expect macros:
      - `expect_float()` / `expect_not_float()`
      - `expect_double()` / `expect_not_double()`
      - `expect_float_in_range()` / `expect_float_not_in_range()`
      - `expect_float_in_set()` / `expect_float_not_in_set()`
      - `mock_double()` / `mock_parameter_double()` for mocking double
        values
    * Assertion Enhancements
      - Pointer assertion macros with custom error messages:
      - `assert_ptr_equal_msg()` / `assert_ptr_not_equal_msg()`
      - `assert_null_msg()` / `assert_non_null_msg()`
      - `assert_true()` and `assert_false()` now provide more verbose
        error messages
      - Memory comparison improvements with better error display
    * Testing Features
      - `has_mock()`: Check if a mock value is available before calling
        `mock()`
      - `stop()`: New feature to stop test execution while allowing
        remaining tests to run
      - `expect_check_data()`: New API for parameter validation with
        custom data (replaces deprecated `expect_check()`)
      - `expect_check_data_any()`: Variant for checking pointer/struct
        parameters
      - Errno mocking convenience macros: `will_set_errno()`,
        `will_set_errno_always()`
    * Output Customization
      - Multiple simultaneous output formats support (can combine
        STANDARD, SUBUNIT, TAP, XML)
      - Output function override capability via `cmocka_set_callbacks()`
      - `cmocka_print_error()`: Public API for printing errors using
        configured output format
    * Documentation and Examples
      - Improved API documentation with better examples
      - Added `expect_check_data()` examples
      - Added errno mocking examples
      - Added parameter setting examples
      - Better mock object examples
    * Build System and Compatibility
      - CMake minimum required version bumped to 3.13
      - CMake namespace support (`cmocka::cmocka`, `cmocka::static`)
      - Meson build system support
      - `extern "C"` wrapper for C++ compatibility
      - Version header (`cmocka_version.h`)
  o Changed
    * API Improvements
      - Changed internal value handling to use `CMockaValueData` union
        for better type safety
      - `_mock()` now returns `CMockaValueData` instead of raw values
      - Improved error messages throughout the library
      - Error messages now print to stdout instead of stderr
      - Better display of memory comparison errors
      - Enhanced string replacement implementation
    * Code Quality
      - Use `bool` instead of `int` for boolean values throughout
      - Use `stdint.h` types (`intmax_t`, `uintmax_t`) instead of
        custom types
      - Reduced call stack consumption in printf functions
      - Added compiler attributes to non-returning functions
      - Use `__builtin_align_down` when available
      - Better alignment handling (MALLOC_ALIGNMENT set to 16)
    * Build Configuration
      - Require C99 standard
      - C extensions enabled by default
      - Windows DLL export improvements with `CMOCKA_DLLEXTERN`
      - `WINDOWS_EXPORT_ALL_SYMBOLS` support
      - Address sanitizer support for MSVC
      - Stack protector flags always passed to linker
    * Documentation Improvements
      - Enhanced API documentation with better organization
      - Cleaned up internal functions from public documentation
      - Better grouping of macros and functions
      - Improved page layout and styling
      - Updated README with more details
    * Examples
      - Modernized and rebuilt calculator example
      - Added new assert_macro examples demonstrating common assertions
      - Removed deprecated allocate module example (use AddressSanitizer instead)
  o Deprecated
      - `expect_check()`: Use `expect_check_data()` instead
      - `check_expected()`: Use `check_expected_int()` or
        `check_expected_uint()` instead
      - `assert_in_range()`: Use `assert_int_in_range()` or
        `assert_uint_in_range()` instead
      - `assert_not_in_range()`: Use `assert_int_not_in_range()` or
        `assert_uint_not_in_range()` instead
      - `assert_in_set()`: Use `assert_int_in_set()` or
        `assert_uint_in_set()` instead
      - `expect_in_range()`: Use `expect_int_in_range()` or
        `expect_uint_in_range()` instead
      - `expect_not_in_range()`: Use `expect_int_not_in_range()` or
        `expect_uint_not_in_range()` instead
      - `expect_value()`: Use `expect_int_value()` or
        `expect_uint_value()` instead
      - `expect_not_value()`: Use `expect_int_not_value()` or
        `expect_uint_not_value()` instead
      - `will_return()`: Use type-specific variants
        (`will_return_int()`, etc.) instead
      - `will_return_count()`: Use type-specific variants instead
      - `will_return_always()`: Use type-specific variants instead
      - `will_set_parameter()`: Use type-specific variants instead
      - Old MSVC support (pre-2008) dropped
      - Cmockery legacy support removed
  o Fixed
      - Fixed missing `cmocka_version.h` in documentation
      - Fixed TAP output for skipped tests
      - Fixed floating-point comparison for `INFINITY` and `NAN`
      - Fixed `expect_not_float()` implementation
      - Fixed `mock_float()` implementation
      - Fixed `assert_double_not_equal()` float handling
      - Fixed `expect_function_calls()` for counts of 0
      - Fixed NULL pointer dereference in `_function_called()`
      - Fixed pointer assertions with function pointers
      - Fixed segmentation fault handling in tests
      - Fixed setjmp in `expect_assert_failure` macro
      - Fixed unexpanded `%s` in leftover values error messages
      - Fixed XML output duration formatting
      - Fixed XML string sanitization (escape slashes and special
        characters)
      - Fixed Windows x64 builds
      - Fixed Windows UWP build errors (C4703)
      - Fixed MinGW pkgconfig path relocation
      - Fixed test calloc overflow checking
      - Fixed symbol map freeing to avoid undefined behavior
      - Fixed memory equal display implementation
      - Fixed comparison between pointer and integer issues
      - Fixed possible data loss on MSVC
      - Fixed conversion warnings from `time_t` to `double`
- Update to version 1.1.8
  * Set CMOCKA_LIBRARIES in package config for backwards compatibility
  * Improve c_strreplace implementation
  * Sanitize XML strings
  * Update check for uintptr_t
  * Require cmake >= 3.10
- Make libcmocka-doc a noarch package
- Fix baselibs.conf for libcmocka-cmake subpackage
- split off -doc and -cmake subpackages, which aren't necessary
  for basic development with cmocka, to avoid pulling in the
  entire cmake-full package (38MB) with libcmocka-devel
- minor simplifications in spec file
- Add missing cmake config files for 32bit packages
- Update to version 1.1.7
  * Fixed tarball generation
- Update to version 1.1.6
  * Added new assert macros to compare 2 double given an epsilon
  * Added meson build system
  * Added header with version to TAP13 output
  * Fixed issues with MSVC
  * Fixed TAP output for skipped tests
  * Fixed issue with fail_msg
  * CMake generated configs for find_package(cmocka)
  * Documentation improvements
- Disable LTO (boo#1133122).
- Update to version 1.1.5
  * Added cmocka_set_skip_filter()
  * cmocka version 1.1.4
  * Added assert_float(_not)_equal()
  * Added expect_any_always()
  * Small bug fixes
- Update to version 1.1.3
  * Fixed subunit output on failures
  * Do not abort if a test is skipped
  * Switched to Modern CMake
- Removed 0001-cmake-Only-support-building-docs-the-on-cmake-3.9.patch
- Fix packaging the documentation
- Added 0001-cmake-Only-support-building-docs-the-on-cmake-3.9.patch
- Update to version 1.1.2
  * Added function to filter tests (cmocka_set_test_filter)
  * Added new mocking example (uptime)
  * Fixed fixture error reporting
  * Fixed compiler flags detection
  * Some improvement for API documentation
- Added HTML documentation
- Update to version 1.1.1
  * Fixed TAP output
  * Fixed cmocka on Windows x64
  * Fixed xUnit output durations
- Fix url for Source0
- Update to version 1.1.0
  * Added support to catch multiple exceptions
  * Added support to verify call ordering
  * Added support to pass initial data to test cases
  * Added will_return_maybe() for ignoring mock returns
  * Added subtests for groups using TAP output
  * Added support to write multiple XML files for groups
  * Improved documentation
  * Fixed XML output generataion
  * Fixed Windows builds with VS2015
- Do not turn of rpath support
- Use properly %cmake macro to build nicely with all the linker/cflags
- Use proper Url and Source
- Properly fails on crashing tests instead of finishing build
- Enable cmockery support
- Update to version 1.0.1
  * Added a macro for assert_ptr_equal().
  * Fixed test_realloc() if 0 size is passed.
  * Fixed objects packaging bug.
  * Fixed building with newer gcc versions.
- Add missing requires for cmake and pkg-config
- Turn on unit tests
- Update to version 1.0.0
  * Added new test runner with group fixtures. The old runner is deprecated
  * Added an extensible message output formatter
  * Added jUnit XML message output
  * Added subunit message output
  * Added Test Anything Protocol message output
  * Added skip() command
  * Added test_realloc()
  * Added a cmockery compat header
  * Fixed a lot of bugs on Windows
- Update to version 0.4.1
  * Added CMOCKA_TEST_ABORT env variable to leave threading apps.
  * Fixed count parameter of expect_check() macro.
  * Fixed reporting the number of tests.
  * Fixed cmake config files.
- Add baselibs.conf as Source.
- Add BuildRequire for pkg-config.
- Add BuildRequire for pkg-config.
- Update to version 0.4.0
  * Added support for group testing.
  * Added assert_return_code().
  * Added better messages for errors.
  * Added cmake config mode support.
  * Fixed bug with unit_test_setup and unit_test_teardown.
  * Fixed a lot of small bugs.
- Update to version 0.3.2
  * Fixed FindNSIS detection.
  * Fixed unit_test_setup() and unit_test_teardown().
  * Fixed GTest and GCC message style conformance
  * Fixed stringification in will_return_always().
- Update to version 0.3.1
  * Fixed pointer conversion on s390 and ppc (32bit big endian).
  * Fixed the customer_database test on big endian.
- Update to version 0.3.0
  * Added a better mock object example.
  * Added pkgconfig file.
  * Added new macros mock_type() and mock_ptr_type().
  * Added more documentation.
  * Fixed installation problems on some platforms.
- Add a libcmocka-devel-static package for the static library.
- Uploaded release tarball.
- Fix building i686 on a x86_64 platform.
- Initial version 0.2.0

OBS-URL: https://build.opensuse.org/request/show/1324715
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cmocka?expand=0&rev=25
2025-12-30 11:00:35 +00:00
0067edcf75 This release helps to address boo#1255045
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmocka?expand=0&rev=71
2025-12-29 14:42:27 +00:00
133a759a21 Accepting request 1323679 from devel:libraries:c_c++
This addresses the issues found by the multipath-tools project

- Update to version 2.0.1
  * Option to disable deprecation warnings via `CMOCKA_NO_DEPRECATION_WARNINGS`
  * Documentation theme is now downloaded during `make docs` instead of at
  * configure time
  * Fixed const-correctness issues throughout the library
- Fix obsoleting libcmocka-cmake
- Update to version 2.0.0
  o Added
    * Test Filtering
      - Environment variable support for test filtering:
      - `CMOCKA_TEST_FILTER`: Filter tests to run by pattern
      - `CMOCKA_SKIP_FILTER`: Filter tests to skip by pattern
      - Improved `cmocka_set_test_filter()` and `cmocka_set_skip_filter()`
        functions
    * Output Formats
      - **TAP 14 support**: Updated Test Anything Protocol output to
        version 14 with YAML diagnostics
      - YAML-formatted error messages with proper indentation
      - `severity` field for distinguishing failures from errors
      - Improved SKIP directive format
    * Type-Safe Assertions and Mocking
      - Type-safe assertion macros for integers:
      - `assert_int_equal()` / `assert_int_not_equal()`
      - `assert_uint_equal()` / `assert_uint_not_equal()`
      - `assert_int_in_range()` / `assert_int_not_in_range()`
      - `assert_uint_in_range()` / `assert_uint_not_in_range()`
      - `assert_int_in_set()` / `assert_int_not_in_set()`
      - `assert_uint_in_set()` / `assert_uint_not_in_set()`
      - Type-safe mocking macros for different types:
      - `will_return_int()`, `will_return_uint()`,
        `will_return_float()`, `will_return_double()`,
        `will_return_ptr()`
      - `will_return_*_count()`, `will_return_*_always()`,
        `will_return_*_maybe()` variants
      - `will_set_parameter_int()`, `will_set_parameter_uint()`,
        `will_set_parameter_float()`, `will_set_parameter_double()`,
        `will_set_parameter_ptr()`
      - `will_set_parameter_*_count()`,
        `will_set_parameter_*_always()`,
        `will_set_parameter_*_maybe()` variants
      - `mock_int()`, `mock_uint()`, `mock_float()`, `mock_double()`,
        `mock_ptr()`
      - Type-safe expect macros:
      - `expect_int_value()` / `expect_uint_value()`
      - `expect_int_not_value()` / `expect_uint_not_value()`
      - `expect_int_in_range()` / `expect_uint_in_range()`
      - `expect_int_not_in_range()` / `expect_uint_not_in_range()`
      - `expect_int_in_set()` / `expect_uint_in_set()`
      - `expect_int_not_in_set()` / `expect_uint_not_in_set()`
      - `expect_check_int()` / `expect_check_uint()`
    * Float and Double Support
      - Floating-point assertion macros:
      - `assert_float_equal()` / `assert_float_not_equal()`
      - `assert_double_equal()` / `assert_double_not_equal()` with
        epsilon parameter
      - `assert_float_in_range()` / `assert_float_not_in_range()`
      - `assert_float_in_set()` / `assert_float_not_in_set()`
      - Floating-point expect macros:
      - `expect_float()` / `expect_not_float()`
      - `expect_double()` / `expect_not_double()`
      - `expect_float_in_range()` / `expect_float_not_in_range()`
      - `expect_float_in_set()` / `expect_float_not_in_set()`
      - `mock_double()` / `mock_parameter_double()` for mocking double
        values
    * Assertion Enhancements
      - Pointer assertion macros with custom error messages:
      - `assert_ptr_equal_msg()` / `assert_ptr_not_equal_msg()`
      - `assert_null_msg()` / `assert_non_null_msg()`
      - `assert_true()` and `assert_false()` now provide more verbose
        error messages
      - Memory comparison improvements with better error display
    * Testing Features
      - `has_mock()`: Check if a mock value is available before calling
        `mock()`
      - `stop()`: New feature to stop test execution while allowing
        remaining tests to run
      - `expect_check_data()`: New API for parameter validation with
        custom data (replaces deprecated `expect_check()`)
      - `expect_check_data_any()`: Variant for checking pointer/struct
        parameters
      - Errno mocking convenience macros: `will_set_errno()`,
        `will_set_errno_always()`
    * Output Customization
      - Multiple simultaneous output formats support (can combine
        STANDARD, SUBUNIT, TAP, XML)
      - Output function override capability via `cmocka_set_callbacks()`
      - `cmocka_print_error()`: Public API for printing errors using
        configured output format
    * Documentation and Examples
      - Improved API documentation with better examples
      - Added `expect_check_data()` examples
      - Added errno mocking examples
      - Added parameter setting examples
      - Better mock object examples
    * Build System and Compatibility
      - CMake minimum required version bumped to 3.13
      - CMake namespace support (`cmocka::cmocka`, `cmocka::static`)
      - Meson build system support
      - `extern "C"` wrapper for C++ compatibility
      - Version header (`cmocka_version.h`)
  o Changed
    * API Improvements
      - Changed internal value handling to use `CMockaValueData` union
        for better type safety
      - `_mock()` now returns `CMockaValueData` instead of raw values
      - Improved error messages throughout the library
      - Error messages now print to stdout instead of stderr
      - Better display of memory comparison errors
      - Enhanced string replacement implementation
    * Code Quality
      - Use `bool` instead of `int` for boolean values throughout
      - Use `stdint.h` types (`intmax_t`, `uintmax_t`) instead of
        custom types
      - Reduced call stack consumption in printf functions
      - Added compiler attributes to non-returning functions
      - Use `__builtin_align_down` when available
      - Better alignment handling (MALLOC_ALIGNMENT set to 16)
    * Build Configuration
      - Require C99 standard
      - C extensions enabled by default
      - Windows DLL export improvements with `CMOCKA_DLLEXTERN`
      - `WINDOWS_EXPORT_ALL_SYMBOLS` support
      - Address sanitizer support for MSVC
      - Stack protector flags always passed to linker
    * Documentation Improvements
      - Enhanced API documentation with better organization
      - Cleaned up internal functions from public documentation
      - Better grouping of macros and functions
      - Improved page layout and styling
      - Updated README with more details
    * Examples
      - Modernized and rebuilt calculator example
      - Added new assert_macro examples demonstrating common assertions
      - Removed deprecated allocate module example (use AddressSanitizer instead)
  o Deprecated
      - `expect_check()`: Use `expect_check_data()` instead
      - `check_expected()`: Use `check_expected_int()` or
        `check_expected_uint()` instead
      - `assert_in_range()`: Use `assert_int_in_range()` or
        `assert_uint_in_range()` instead
      - `assert_not_in_range()`: Use `assert_int_not_in_range()` or
        `assert_uint_not_in_range()` instead
      - `assert_in_set()`: Use `assert_int_in_set()` or
        `assert_uint_in_set()` instead
      - `expect_in_range()`: Use `expect_int_in_range()` or
        `expect_uint_in_range()` instead
      - `expect_not_in_range()`: Use `expect_int_not_in_range()` or
        `expect_uint_not_in_range()` instead
      - `expect_value()`: Use `expect_int_value()` or
        `expect_uint_value()` instead
      - `expect_not_value()`: Use `expect_int_not_value()` or
        `expect_uint_not_value()` instead
      - `will_return()`: Use type-specific variants
        (`will_return_int()`, etc.) instead
      - `will_return_count()`: Use type-specific variants instead
      - `will_return_always()`: Use type-specific variants instead
      - `will_set_parameter()`: Use type-specific variants instead
      - Old MSVC support (pre-2008) dropped
      - Cmockery legacy support removed
  o Fixed
      - Fixed missing `cmocka_version.h` in documentation
      - Fixed TAP output for skipped tests
      - Fixed floating-point comparison for `INFINITY` and `NAN`
      - Fixed `expect_not_float()` implementation
      - Fixed `mock_float()` implementation
      - Fixed `assert_double_not_equal()` float handling
      - Fixed `expect_function_calls()` for counts of 0
      - Fixed NULL pointer dereference in `_function_called()`
      - Fixed pointer assertions with function pointers
      - Fixed segmentation fault handling in tests
      - Fixed setjmp in `expect_assert_failure` macro
      - Fixed unexpanded `%s` in leftover values error messages
      - Fixed XML output duration formatting
      - Fixed XML string sanitization (escape slashes and special
        characters)
      - Fixed Windows x64 builds
      - Fixed Windows UWP build errors (C4703)
      - Fixed MinGW pkgconfig path relocation
      - Fixed test calloc overflow checking
      - Fixed symbol map freeing to avoid undefined behavior
      - Fixed memory equal display implementation
      - Fixed comparison between pointer and integer issues
      - Fixed possible data loss on MSVC
      - Fixed conversion warnings from `time_t` to `double`

OBS-URL: https://build.opensuse.org/request/show/1323679
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cmocka?expand=0&rev=24
2025-12-23 12:43:45 +00:00
2567e26dd4 Update to version 2.0.1
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmocka?expand=0&rev=69
2025-12-19 13:52:25 +00:00
096b9b62bd Fix obsoleting libcmocka-cmake
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmocka?expand=0&rev=68
2025-12-16 10:46:52 +00:00
6a49e5ef71 Update to version 2.0.0
o Added
    * Test Filtering
      - Environment variable support for test filtering:
      - `CMOCKA_TEST_FILTER`: Filter tests to run by pattern
      - `CMOCKA_SKIP_FILTER`: Filter tests to skip by pattern
      - Improved `cmocka_set_test_filter()` and `cmocka_set_skip_filter()`
        functions
    * Output Formats
      - **TAP 14 support**: Updated Test Anything Protocol output to
        version 14 with YAML diagnostics
      - YAML-formatted error messages with proper indentation
      - `severity` field for distinguishing failures from errors
      - Improved SKIP directive format
    * Type-Safe Assertions and Mocking
      - Type-safe assertion macros for integers:
      - `assert_int_equal()` / `assert_int_not_equal()`
      - `assert_uint_equal()` / `assert_uint_not_equal()`
      - `assert_int_in_range()` / `assert_int_not_in_range()`
      - `assert_uint_in_range()` / `assert_uint_not_in_range()`
      - `assert_int_in_set()` / `assert_int_not_in_set()`
      - `assert_uint_in_set()` / `assert_uint_not_in_set()`
      - Type-safe mocking macros for different types:
      - `will_return_int()`, `will_return_uint()`,
        `will_return_float()`, `will_return_double()`,
        `will_return_ptr()`
      - `will_return_*_count()`, `will_return_*_always()`,
        `will_return_*_maybe()` variants
      - `will_set_parameter_int()`, `will_set_parameter_uint()`,
        `will_set_parameter_float()`, `will_set_parameter_double()`,

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmocka?expand=0&rev=67
2025-12-08 08:48:23 +00:00
9427cf4753 Accepting request 1294040 from devel:libraries:c_c++
- Update to version 1.1.8
  * Set CMOCKA_LIBRARIES in package config for backwards compatibility
  * Improve c_strreplace implementation
  * Sanitize XML strings
  * Update check for uintptr_t
  * Require cmake >= 3.10
- Make libcmocka-doc a noarch package

OBS-URL: https://build.opensuse.org/request/show/1294040
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cmocka?expand=0&rev=23
2025-07-23 14:31:48 +00:00
04021fecb0 Update to version 1.1.8
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmocka?expand=0&rev=65
2025-07-17 07:12:54 +00:00
54b2545096 Accepting request 1179326 from devel:libraries:c_c++
- Fix baselibs.conf for libcmocka-cmake subpackage

OBS-URL: https://build.opensuse.org/request/show/1179326
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cmocka?expand=0&rev=22
2024-06-09 18:19:04 +00:00
f9fada635a Fix baselibs
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmocka?expand=0&rev=63
2024-06-07 14:03:57 +00:00
69b795c471 Fix baselibs.conf
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmocka?expand=0&rev=62
2024-06-07 13:52:13 +00:00
640d81b271 Fix requires
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmocka?expand=0&rev=61
2024-06-07 13:50:33 +00:00
38313c6fce Fix baselibs.conf for libcmocka-cmake subpackage
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmocka?expand=0&rev=60
2024-06-07 11:09:40 +00:00
8bb104dcaa Accepting request 1108441 from devel:libraries:c_c++
OBS-URL: https://build.opensuse.org/request/show/1108441
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cmocka?expand=0&rev=21
2023-09-02 20:07:01 +00:00
94ccfd53b4 Accepting request 1108263 from home:mwilck:branches:devel:libraries:c_c++
- 4th attempt to split off the -cmake and -doc subpackages. Supersedes sr#1107991.
- replaced "Supplements" of libcmocka-cmake with conditional requires of libcmocka-devel. This should pull in the cmake support wherever it's required.
- added dependency of libcmocka-cmake on libcmocka-devel to make cmake(cmocka) build dependencies work. socket_wrapper builds successfully now with this cmocka package.
- Fixed "/usr/lib64" issue with previous submission (sr#1105410)


- split off -doc and -cmake subpackages, which aren't necessary
  for basic development with cmocka, to avoid pulling in the
  entire cmake-full package (38MB) with libcmocka-devel
- minor simplifications in spec file

OBS-URL: https://build.opensuse.org/request/show/1108263
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmocka?expand=0&rev=58
2023-09-01 11:23:03 +00:00
76736e3df1 Revert latest changes which do not work
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmocka?expand=0&rev=57
2023-08-29 09:25:24 +00:00
3099e3d60f Accepting request 1105410 from home:mwilck:branches:devel:libraries:c_c++
- split off -doc and -cmake subpackages, which aren't necessary
  for basic development with cmocka, to avoid pulling in the
  entire cmake-full package (38MB) with libcmocka-devel
- minor simplifications in spec file

OBS-URL: https://build.opensuse.org/request/show/1105410
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmocka?expand=0&rev=56
2023-08-23 07:58:14 +00:00
8 changed files with 316 additions and 42 deletions

View File

@@ -2,6 +2,8 @@ libcmocka0
provides "libcmocka-<targettype> = <version>"
obsoletes "libmockery-<targettype> <= <version>"
libcmocka-devel
+/usr/lib(64)?/cmake/cmocka/.*
requires -"libcmocka-<targettype>"
requires "libcmocka0-<targettype> = <version>"
libcmocka-cmake-devel
+/usr/lib(64)?/cmake/cmocka/.*
requires "libcmocka-devel-<targettype> = <version>"

Binary file not shown.

View File

@@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEjf9T4Y8qvI2PPJIjfuD8TcwBTj0FAmP3ctgACgkQfuD8TcwB
Tj3xYxAAng0v96Q451nwdc+UStqLKMWeou2zNvADLVVuWP70cublsbMrEwrsB6B9
eXzD6oqSmyUTBRwishWkSjh5QQeSWkBw00SZy77UfUrxUww23985DW/rQCSESvTD
IOEOw9HXdBIZGqUCQ5U6K5ukIy8+MuTymzTdmZYdYtP8Y+yp6CM9i4fLDLX/D3Ac
noPa4JW3xt8ypFfINEJMelrStxXHilulA8l1MzwLnxd7Hc5pul+9PepyjS3Fipq6
Z/pwNU9Vg8sA0y/VBfP6QNLY/im99fNl6gcoluG/jo2ealz5vQatuCEtnkn7jOK7
/JFXTklyI+o5s5CiOnmg7AXQPF5YJUVNyvD733lxhu4atURGydAazf+BIf8p8EOf
smXcbVn0q4sk/gY28kHvGzVRGTR5sNIHKuudV9R6DL034E6vWziPdmxI7joXmVd0
VJw3pSgx+PavKgRikPnvpTsMgUDuOUzWeG7Ih5O0SYTArwkMNCVaUiQmD9KSXahQ
lGEdDreCv8HyIlSxMozYu8zWwbhS0dZhOmEfA3kxOQukl0OUcbQcdxsXjwJG3Yh+
i9HvAW2fv1YSzzIllDyfHIp8YBeY2XmTnnkqTEMInihcvrB3BAXfDxVmgHK74oO4
4G92bINVhrG9+EnEeV913r8WRexO3qVG7dF1uCuUVUcDZXsAV5E=
=+KpI
-----END PGP SIGNATURE-----

3
cmocka-2.0.2.tar.xz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:39f92f366bdf3f1a02af4da75b4a5c52df6c9f7e736c7d65de13283f9f0ef416
size 121144

17
cmocka-2.0.2.tar.xz.asc Normal file
View File

@@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
iQJPBAABCgA5FiEEjf9T4Y8qvI2PPJIjfuD8TcwBTj0FAmlktqcbFIAAAAAABAAO
bWFudTIsMi41KzEuMTEsMiwyAAoJEH7g/E3MAU49lY0P/jzB5GPFYvFaW7ekmGUF
QiREn6IyrWFZR/JgZTWtKH0VsCq9FL/jCoeeZCY1Eo6ikUPxQadWobNh0tOmC9Tv
zQA+DJGyx36uuZ8xP9SEV+IkE12Yiy8XdO0znH8Y6rLvwPMiqEC/S19pO8Lkw833
6Va2EUHMOkIGfH/Lmm/0FOaC2yRCTpA9ttwz4wicbkipDlPjn8T1GF3yx0ymU4wX
jerv7KY6yf1BQ1UI6p7MGRDElxVI4RTn7jXjBm08MPmM8Xvafst6CvBjtQoxPm8T
nxpPCQ9SZo5tl11FwICfHDbtLWqH36K/GXAz2U6tRTvmA7S/UFs6p67ZZ7dsgCok
g+ogpFaHlYKd6/BC+IrOflqxBGxL2pHzVwTT2m30vHcWL9NUUGyfIiv8xPrAk/LI
rA9g3Rz3eEnCxX2zqWTdqRmwPRaU8xclLnj70BKqybesfSwC0YqgkanBfIAAN47e
E5pYXXDWktXIKVgTF7RJBWBG+n7rYEqAaOK79S4YGcVKLLRkQWT4fs/gdVYdbOdO
Q5ucnmyY4F8UNlOTPH5IuL9aRhd2tvUZqwChKdcPubZUf1SuuhWh2MG1sUAMT5tB
fB4V5IH8wLeCppmz9JweWZJ8AhUWnJGl0ilhMFksWVWR8byqbM3PjCkcFHwjSQxi
CTvDM+OZZ0u5TMRGyg7yaN9G
=4LGH
-----END PGP SIGNATURE-----

View File

@@ -1,3 +1,249 @@
-------------------------------------------------------------------
Tue Jan 13 06:56:03 UTC 2026 - Andreas Schneider <asn@cryptomilk.org>
- Update to version 2.0.2
* Fixed a typo in CMOCKA_NO_DEPRECATION_WARNINGS
-------------------------------------------------------------------
Fri Dec 19 13:51:03 UTC 2025 - Andreas Schneider <asn@cryptomilk.org>
- Update to version 2.0.1
* Option to disable deprecation warnings via `CMOCKA_NO_DEPRECATION_WARNINGS`
* Documentation theme is now downloaded during `make docs` instead of at
* configure time
* Fixed const-correctness issues throughout the library
- This release helps to address boo#1255045
-------------------------------------------------------------------
Tue Dec 16 10:45:26 UTC 2025 - Andreas Schneider <asn@cryptomilk.org>
- Fix obsoleting libcmocka-cmake
-------------------------------------------------------------------
Mon Dec 8 08:41:10 UTC 2025 - Andreas Schneider <asn@cryptomilk.org>
- Update to version 2.0.0
o Added
* Test Filtering
- Environment variable support for test filtering:
- `CMOCKA_TEST_FILTER`: Filter tests to run by pattern
- `CMOCKA_SKIP_FILTER`: Filter tests to skip by pattern
- Improved `cmocka_set_test_filter()` and `cmocka_set_skip_filter()`
functions
* Output Formats
- **TAP 14 support**: Updated Test Anything Protocol output to
version 14 with YAML diagnostics
- YAML-formatted error messages with proper indentation
- `severity` field for distinguishing failures from errors
- Improved SKIP directive format
* Type-Safe Assertions and Mocking
- Type-safe assertion macros for integers:
- `assert_int_equal()` / `assert_int_not_equal()`
- `assert_uint_equal()` / `assert_uint_not_equal()`
- `assert_int_in_range()` / `assert_int_not_in_range()`
- `assert_uint_in_range()` / `assert_uint_not_in_range()`
- `assert_int_in_set()` / `assert_int_not_in_set()`
- `assert_uint_in_set()` / `assert_uint_not_in_set()`
- Type-safe mocking macros for different types:
- `will_return_int()`, `will_return_uint()`,
`will_return_float()`, `will_return_double()`,
`will_return_ptr()`
- `will_return_*_count()`, `will_return_*_always()`,
`will_return_*_maybe()` variants
- `will_set_parameter_int()`, `will_set_parameter_uint()`,
`will_set_parameter_float()`, `will_set_parameter_double()`,
`will_set_parameter_ptr()`
- `will_set_parameter_*_count()`,
`will_set_parameter_*_always()`,
`will_set_parameter_*_maybe()` variants
- `mock_int()`, `mock_uint()`, `mock_float()`, `mock_double()`,
`mock_ptr()`
- Type-safe expect macros:
- `expect_int_value()` / `expect_uint_value()`
- `expect_int_not_value()` / `expect_uint_not_value()`
- `expect_int_in_range()` / `expect_uint_in_range()`
- `expect_int_not_in_range()` / `expect_uint_not_in_range()`
- `expect_int_in_set()` / `expect_uint_in_set()`
- `expect_int_not_in_set()` / `expect_uint_not_in_set()`
- `expect_check_int()` / `expect_check_uint()`
* Float and Double Support
- Floating-point assertion macros:
- `assert_float_equal()` / `assert_float_not_equal()`
- `assert_double_equal()` / `assert_double_not_equal()` with
epsilon parameter
- `assert_float_in_range()` / `assert_float_not_in_range()`
- `assert_float_in_set()` / `assert_float_not_in_set()`
- Floating-point expect macros:
- `expect_float()` / `expect_not_float()`
- `expect_double()` / `expect_not_double()`
- `expect_float_in_range()` / `expect_float_not_in_range()`
- `expect_float_in_set()` / `expect_float_not_in_set()`
- `mock_double()` / `mock_parameter_double()` for mocking double
values
* Assertion Enhancements
- Pointer assertion macros with custom error messages:
- `assert_ptr_equal_msg()` / `assert_ptr_not_equal_msg()`
- `assert_null_msg()` / `assert_non_null_msg()`
- `assert_true()` and `assert_false()` now provide more verbose
error messages
- Memory comparison improvements with better error display
* Testing Features
- `has_mock()`: Check if a mock value is available before calling
`mock()`
- `stop()`: New feature to stop test execution while allowing
remaining tests to run
- `expect_check_data()`: New API for parameter validation with
custom data (replaces deprecated `expect_check()`)
- `expect_check_data_any()`: Variant for checking pointer/struct
parameters
- Errno mocking convenience macros: `will_set_errno()`,
`will_set_errno_always()`
* Output Customization
- Multiple simultaneous output formats support (can combine
STANDARD, SUBUNIT, TAP, XML)
- Output function override capability via `cmocka_set_callbacks()`
- `cmocka_print_error()`: Public API for printing errors using
configured output format
* Documentation and Examples
- Improved API documentation with better examples
- Added `expect_check_data()` examples
- Added errno mocking examples
- Added parameter setting examples
- Better mock object examples
* Build System and Compatibility
- CMake minimum required version bumped to 3.13
- CMake namespace support (`cmocka::cmocka`, `cmocka::static`)
- Meson build system support
- `extern "C"` wrapper for C++ compatibility
- Version header (`cmocka_version.h`)
o Changed
* API Improvements
- Changed internal value handling to use `CMockaValueData` union
for better type safety
- `_mock()` now returns `CMockaValueData` instead of raw values
- Improved error messages throughout the library
- Error messages now print to stdout instead of stderr
- Better display of memory comparison errors
- Enhanced string replacement implementation
* Code Quality
- Use `bool` instead of `int` for boolean values throughout
- Use `stdint.h` types (`intmax_t`, `uintmax_t`) instead of
custom types
- Reduced call stack consumption in printf functions
- Added compiler attributes to non-returning functions
- Use `__builtin_align_down` when available
- Better alignment handling (MALLOC_ALIGNMENT set to 16)
* Build Configuration
- Require C99 standard
- C extensions enabled by default
- Windows DLL export improvements with `CMOCKA_DLLEXTERN`
- `WINDOWS_EXPORT_ALL_SYMBOLS` support
- Address sanitizer support for MSVC
- Stack protector flags always passed to linker
* Documentation Improvements
- Enhanced API documentation with better organization
- Cleaned up internal functions from public documentation
- Better grouping of macros and functions
- Improved page layout and styling
- Updated README with more details
* Examples
- Modernized and rebuilt calculator example
- Added new assert_macro examples demonstrating common assertions
- Removed deprecated allocate module example (use AddressSanitizer instead)
o Deprecated
- `expect_check()`: Use `expect_check_data()` instead
- `check_expected()`: Use `check_expected_int()` or
`check_expected_uint()` instead
- `assert_in_range()`: Use `assert_int_in_range()` or
`assert_uint_in_range()` instead
- `assert_not_in_range()`: Use `assert_int_not_in_range()` or
`assert_uint_not_in_range()` instead
- `assert_in_set()`: Use `assert_int_in_set()` or
`assert_uint_in_set()` instead
- `expect_in_range()`: Use `expect_int_in_range()` or
`expect_uint_in_range()` instead
- `expect_not_in_range()`: Use `expect_int_not_in_range()` or
`expect_uint_not_in_range()` instead
- `expect_value()`: Use `expect_int_value()` or
`expect_uint_value()` instead
- `expect_not_value()`: Use `expect_int_not_value()` or
`expect_uint_not_value()` instead
- `will_return()`: Use type-specific variants
(`will_return_int()`, etc.) instead
- `will_return_count()`: Use type-specific variants instead
- `will_return_always()`: Use type-specific variants instead
- `will_set_parameter()`: Use type-specific variants instead
- Old MSVC support (pre-2008) dropped
- Cmockery legacy support removed
o Fixed
- Fixed missing `cmocka_version.h` in documentation
- Fixed TAP output for skipped tests
- Fixed floating-point comparison for `INFINITY` and `NAN`
- Fixed `expect_not_float()` implementation
- Fixed `mock_float()` implementation
- Fixed `assert_double_not_equal()` float handling
- Fixed `expect_function_calls()` for counts of 0
- Fixed NULL pointer dereference in `_function_called()`
- Fixed pointer assertions with function pointers
- Fixed segmentation fault handling in tests
- Fixed setjmp in `expect_assert_failure` macro
- Fixed unexpanded `%s` in leftover values error messages
- Fixed XML output duration formatting
- Fixed XML string sanitization (escape slashes and special
characters)
- Fixed Windows x64 builds
- Fixed Windows UWP build errors (C4703)
- Fixed MinGW pkgconfig path relocation
- Fixed test calloc overflow checking
- Fixed symbol map freeing to avoid undefined behavior
- Fixed memory equal display implementation
- Fixed comparison between pointer and integer issues
- Fixed possible data loss on MSVC
- Fixed conversion warnings from `time_t` to `double`
-------------------------------------------------------------------
Thu Jul 17 07:06:11 UTC 2025 - Andreas Schneider <asn@cryptomilk.org>
- Update to version 1.1.8
* Set CMOCKA_LIBRARIES in package config for backwards compatibility
* Improve c_strreplace implementation
* Sanitize XML strings
* Update check for uintptr_t
* Require cmake >= 3.10
- Make libcmocka-doc a noarch package
-------------------------------------------------------------------
Fri Jun 7 11:09:17 UTC 2024 - Andreas Schneider <asn@cryptomilk.org>
- Fix baselibs.conf for libcmocka-cmake subpackage
-------------------------------------------------------------------
Wed Aug 23 06:30:05 UTC 2023 - Martin Wilck <mwilck@suse.com>
- split off -doc and -cmake subpackages, which aren't necessary
for basic development with cmocka, to avoid pulling in the
entire cmake-full package (38MB) with libcmocka-devel
- minor simplifications in spec file
-------------------------------------------------------------------
Fri May 5 09:26:51 UTC 2023 - Andreas Schneider <asn@cryptomilk.org>

View File

@@ -1,7 +1,7 @@
#
# spec file for package cmocka
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,17 +24,18 @@
%endif
Name: cmocka
Version: 1.1.7
Version: 2.0.2
Release: 0
Summary: Lightweight library to simplify and generalize unit tests for C
License: Apache-2.0
Group: Productivity/Networking/Other
URL: https://cmocka.org
Source0: https://cmocka.org/files/1.1/%{name}-%{version}.tar.xz
Source1: https://cmocka.org/files/1.1/%{name}-%{version}.tar.xz.asc
Source0: https://cmocka.org/files/2.0/%{name}-%{version}.tar.xz
Source1: https://cmocka.org/files/2.0/%{name}-%{version}.tar.xz.asc
Source2: %{name}.keyring
Source3: baselibs.conf
Source4: https://github.com/jothepro/doxygen-awesome-css/archive/refs/tags/v2.4.1/doxygen-awesome-css-2.4.1.tar.gz
BuildRequires: cmake
BuildRequires: doxygen
@@ -88,23 +89,46 @@ compilers.
%package -n libcmocka-devel
Summary: Development headers for the cmocka library
Group: Development/Libraries/C and C++
Requires: cmake
Requires: libcmocka0 = %{version}
Requires: pkg-config
Requires: pkgconf-pkg-config
Requires: (libcmocka-cmake-devel if cmake)
%description -n libcmocka-devel
Development headers for the cmocka unit testing library.
%package -n libcmocka-doc
Summary: Documentation for the cmocka library
Group: Development/Libraries/C and C++
Enhances: libcmocka-devel
Provides: libcmocka-devel:%{_defaultdocdir}/libcmocka-devel
BuildArch: noarch
%description -n libcmocka-doc
Documentation for the cmocka unit testing library.
%package -n libcmocka-cmake-devel
Summary: CMake support for the cmocka library
Group: Development/Libraries/C and C++
Requires: cmake
Requires: libcmocka-devel = %{version}
Provides: libcmocka-devel:%{_libdir}/cmake/cmocka
Obsoletes: libcmocka-cmake < %{version}
Provides: libcmocka-cmake = %{version}
%description -n libcmocka-cmake-devel
cmake support for developing with the cmocka unit testing library.
%prep
%autosetup -p1
%autosetup -a4 -p1
%build
%define _lto_cflags %{nil}
%cmake \
-DCMAKE_SKIP_RPATH=OFF \
-DWITH_STATIC_LIB=ON \
-DWITH_CMOCKERY_SUPPORT=ON \
-DUNIT_TESTING=ON
-DUNIT_TESTING=ON \
-DDOXYGEN_AWESOME_CSS_DIR=%{_sourcedir}/doxygen-awesome-css-2.4.1
make %{?_smp_mflags}
%if %{with docs}
@@ -125,25 +149,23 @@ popd
%postun -n libcmocka0 -p /sbin/ldconfig
%files -n libcmocka0
%doc AUTHORS README.md ChangeLog
%license COPYING
%doc AUTHORS README.md CHANGELOG.md
%license LICENSE
%{_libdir}/libcmocka.so.*
%files -n libcmocka-devel
%if %{with docs}
%doc build/doc/html
#endif with docs
%endif
%{_includedir}/cmocka.h
%{_includedir}/cmocka_pbc.h
%dir %{_includedir}/cmockery
%{_includedir}/cmockery/cmockery.h
%{_includedir}/cmockery/pbc.h
%{_includedir}/cmocka_version.h
%{_libdir}/libcmocka.so
%{_libdir}/pkgconfig/cmocka.pc
%dir %{_libdir}/cmake/cmocka
%{_libdir}/cmake/cmocka/cmocka-config-relwithdebinfo.cmake
%{_libdir}/cmake/cmocka/cmocka-config-version.cmake
%{_libdir}/cmake/cmocka/cmocka-config.cmake
%files -n libcmocka-cmake-devel
%{_libdir}/cmake/cmocka
%if %{with docs}
%files -n libcmocka-doc
%doc build/doc/html
%endif
%changelog

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:da313e9ed72260c0c0690e8c93f409dc426183dae6d7772d30cad8875b2e11b3
size 6085383