|
Navigation
Recherche
|
cmocka 2.0 released
jeudi 4 décembre 2025, 15:09 , par LWN.net
Andreas Schneider has announced
version 2.0 of the cmocka unit-testing framework for C: This release represents a major modernization effort, bringing cmocka firmly into the 'modern' C99 era while maintaining the simplicity and ease of use that users have come to expect. One of the most significant changes in cmocka 2.0 is the migration to C99 standard integer types. The LargestIntegralType typedef has been replaced with intmax_t and uintmax_t from stdint.h, providing better type safety and portability across different platforms. Additionally, we've adopted the bool type where appropriate, making the code more expressive and self-documenting. Using intmax_t and uintmax_t also allows to print better error messages. So you can now find e.g. assert_int_equal and assert_uint_equal. cmocka 2.0 introduces a comprehensive set of type-specific assertion macros, including `assert_uint_equal()`, `assert_float_equal()`, and enhanced pointer assertions. The mocking system has also been significantly improved with type-specific macros like `will_return_int()` and `will_return_float()`. The same for parameter checking etc. LWN covered the project early in its development in 2013. See the full list of new features, enhancements, and bug fixes in cmocka 2.0 in the changelog.
https://lwn.net/Articles/1049199/
|
56 sources (32 en français)
Date Actuelle
jeu. 4 déc. - 15:50 CET
|








