cmocka 2.0 released
Andreas Schneider has announcedversion 2.0 of the cmockaunit-testing framework for C:
This release represents a major modernization effort, bringingcmocka firmly into the "modern" C99 era while maintaining thesimplicity and ease of use that users have come to expect.
One of the most significant changes in cmocka 2.0 is the migrationto C99 standard integer types. The LargestIntegralType typedef hasbeen replaced with intmax_t and uintmax_t fromstdint.h, providing better type safety and portability acrossdifferent platforms. Additionally, we've adopted the bool type whereappropriate, making the code more expressive and self-documenting.
Using intmax_t and uintmax_t also allows to printbetter error messages. So you can now finde.g. assert_int_equal and assert_uint_equal.
cmocka 2.0 introduces a comprehensive set of type-specificassertion macros, including `assert_uint_equal()`,`assert_float_equal()`, and enhanced pointer assertions. The mockingsystem has also been significantly improved with type-specific macroslike `will_return_int()` and `will_return_float()`. The same forparameter checking etc.
LWN covered theproject early in its development in 2013. See the full list of newfeatures, enhancements, and bug fixes in cmocka 2.0 in the changelog.