|
cmocka 2.0.0
Unit testing library with mock support
|
Query cmocka library version at compile time and runtime. More...
Macros | |
| #define | CMOCKA_VERSION_MAJOR 2 |
| cmocka major version number. | |
| #define | CMOCKA_VERSION_MINOR 0 |
| cmocka minor version number. | |
| #define | CMOCKA_VERSION_MICRO 0 |
| cmocka micro (patch) version number. | |
| #define | CMOCKA_VERSION_INT |
| cmocka version as an integer for easy comparison. | |
| #define | CMOCKA_VERSION |
| cmocka version as a string (e.g., "1.9.0"). | |
Query cmocka library version at compile time and runtime.
These macros provide access to the cmocka library version information, allowing you to check which version of cmocka is being used in your tests.
The version is composed of three components:
You can use CMOCKA_VERSION_INT to check if the library meets a minimum version requirement:
The CMOCKA_VERSION macro can be used to get the version as a string:
| #define CMOCKA_VERSION |
cmocka version as a string (e.g., "1.9.0").
This macro provides the complete version number as a string constant.
| #define CMOCKA_VERSION_INT |
cmocka version as an integer for easy comparison.
This macro provides the complete version number as a single integer value, which is useful for compile-time version checks.
The version is encoded as: (major << 16) | (minor << 8) | micro
| #define CMOCKA_VERSION_MAJOR 2 |
cmocka major version number.
This is incremented when incompatible API changes are made.
| #define CMOCKA_VERSION_MICRO 0 |
cmocka micro (patch) version number.
This is incremented for backward-compatible bug fixes.
| #define CMOCKA_VERSION_MINOR 0 |
cmocka minor version number.
This is incremented when functionality is added in a backward-compatible manner.