head 1.4; access; symbols pkgsrc-2026Q1:1.3.0.6 pkgsrc-2026Q1-base:1.3 pkgsrc-2025Q4:1.3.0.4 pkgsrc-2025Q4-base:1.3 pkgsrc-2025Q3:1.3.0.2 pkgsrc-2025Q3-base:1.3 pkgsrc-2025Q2:1.2.0.12 pkgsrc-2025Q2-base:1.2 pkgsrc-2025Q1:1.2.0.10 pkgsrc-2025Q1-base:1.2 pkgsrc-2024Q4:1.2.0.8 pkgsrc-2024Q4-base:1.2 pkgsrc-2024Q3:1.2.0.6 pkgsrc-2024Q3-base:1.2 pkgsrc-2024Q2:1.2.0.4 pkgsrc-2024Q2-base:1.2 pkgsrc-2024Q1:1.2.0.2 pkgsrc-2024Q1-base:1.2 pkgsrc-2023Q4:1.1.0.42 pkgsrc-2023Q4-base:1.1 pkgsrc-2023Q3:1.1.0.40 pkgsrc-2023Q3-base:1.1 pkgsrc-2023Q2:1.1.0.38 pkgsrc-2023Q2-base:1.1 pkgsrc-2023Q1:1.1.0.36 pkgsrc-2023Q1-base:1.1 pkgsrc-2022Q4:1.1.0.34 pkgsrc-2022Q4-base:1.1 pkgsrc-2022Q3:1.1.0.32 pkgsrc-2022Q3-base:1.1 pkgsrc-2022Q2:1.1.0.30 pkgsrc-2022Q2-base:1.1 pkgsrc-2022Q1:1.1.0.28 pkgsrc-2022Q1-base:1.1 pkgsrc-2021Q4:1.1.0.26 pkgsrc-2021Q4-base:1.1 pkgsrc-2021Q3:1.1.0.24 pkgsrc-2021Q3-base:1.1 pkgsrc-2021Q2:1.1.0.22 pkgsrc-2021Q2-base:1.1 pkgsrc-2021Q1:1.1.0.20 pkgsrc-2021Q1-base:1.1 pkgsrc-2020Q4:1.1.0.18 pkgsrc-2020Q4-base:1.1 pkgsrc-2020Q3:1.1.0.16 pkgsrc-2020Q3-base:1.1 pkgsrc-2020Q2:1.1.0.14 pkgsrc-2020Q2-base:1.1 pkgsrc-2020Q1:1.1.0.10 pkgsrc-2020Q1-base:1.1 pkgsrc-2019Q4:1.1.0.12 pkgsrc-2019Q4-base:1.1 pkgsrc-2019Q3:1.1.0.8 pkgsrc-2019Q3-base:1.1 pkgsrc-2019Q2:1.1.0.6 pkgsrc-2019Q2-base:1.1 pkgsrc-2019Q1:1.1.0.4 pkgsrc-2019Q1-base:1.1 pkgsrc-2018Q4:1.1.0.2 pkgsrc-2018Q4-base:1.1; locks; strict; comment @# @; 1.4 date 2026.06.11.07.20.58; author wiz; state dead; branches; next 1.3; commitid jb3exjrtFQyBNlJG; 1.3 date 2025.07.23.08.09.09; author pin; state Exp; branches; next 1.2; commitid AOOuXVvsHBmQrQ3G; 1.2 date 2024.01.06.09.07.07; author pin; state Exp; branches; next 1.1; commitid v4Z4ln3r14sKTmTE; 1.1 date 2018.12.03.15.16.33; author adam; state Exp; branches; next ; commitid 19RQ58uA9tu7Jm2B; desc @@ 1.4 log @cmocka: update to 2.0.2. ## [2.0.2] - 2026-01-12 ### Fixed - Fixed typo in `CMOCKA_NO_DEPRECATION_WARNINGS` ## [2.0.1] - 2025-12-19 ### Added - Option to disable deprecation warnings via `CMOCKA_NO_DEPRECATION_WARNINGS` ### Changed - Documentation theme is now downloaded during `make docs` instead of at configure time ### Fixed - Fixed const-correctness issues throughout the library ## [2.0.0] - 2025-12-04 ### 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`) ### 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) ### 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 ### 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` ### Infrastructure - Added GitLab CI pipeline with multiple platforms: - Linux (Ubuntu, Fedora, Debian) - Windows (MinGW, MSVC) - FreeBSD - Code coverage analysis - Static analysis (Coverity, cppcheck) - Address and UB sanitizers - Added SBOM template in CycloneDX format - Added clang-format configuration - Added .editorconfig - Added CONTRIBUTING.md - Added Coverity modeling files @ text @$NetBSD: patch-CompilerChecks.cmake,v 1.3 2025/07/23 08:09:09 pin Exp $ Let PkgSrc handle security features. --- CompilerChecks.cmake.orig 2025-07-23 07:22:57.049057609 +0000 +++ CompilerChecks.cmake @@@@ -64,29 +64,6 @@@@ if (UNIX) endif() endif() - check_c_compiler_flag_ssp("-fstack-protector-strong" WITH_STACK_PROTECTOR_STRONG) - if (WITH_STACK_PROTECTOR_STRONG) - list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-protector-strong") - # This is needed as Solaris has a seperate libssp - if (SOLARIS) - list(APPEND SUPPORTED_LINKER_FLAGS "-fstack-protector-strong") - endif() - else (WITH_STACK_PROTECTOR_STRONG) - check_c_compiler_flag_ssp("-fstack-protector" WITH_STACK_PROTECTOR) - if (WITH_STACK_PROTECTOR) - list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-protector") - # This is needed as Solaris has a seperate libssp - if (SOLARIS) - list(APPEND SUPPORTED_LINKER_FLAGS "-fstack-protector") - endif() - endif() - endif (WITH_STACK_PROTECTOR_STRONG) - - check_c_compiler_flag_ssp("-fstack-clash-protection" WITH_STACK_CLASH_PROTECTION) - if (WITH_STACK_CLASH_PROTECTION) - list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-clash-protection") - endif() - if (PICKY_DEVELOPER) add_c_compiler_flag("-Wno-error=deprecated-declarations" SUPPORTED_COMPILER_FLAGS) add_c_compiler_flag("-Wno-error=tautological-compare" SUPPORTED_COMPILER_FLAGS) @ 1.3 log @devel/cmocka: update to 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 @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @devel/cmocka: update to 1.1.7 1.1.7 * Update ignore list for source tarball generation 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 @ text @d5 1 a5 1 --- CompilerChecks.cmake.orig 2024-01-05 09:27:46.665856486 +0000 d7 1 a7 1 @@@@ -66,29 +66,6 @@@@ if (UNIX) @ 1.1 log @cmocka: updated to 1.1.3 cmocka version 1.1.3 * Fixed subunit output on failures * Do not abort if a test is skipped * Switched to Modern CMake cmocka 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 cmocka: version 1.1.1 * Fixed TAP output * Fixed cmocka on Windows x64 * Fixed xUnit output durations cmocka: 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 @ text @d5 1 a5 1 --- CompilerChecks.cmake.orig 2018-12-03 09:42:07.000000000 +0000 d7 1 a7 1 @@@@ -62,28 +62,6 @@@@ if (UNIX) d33 1 a33 1 d36 1 @