Registry / testing / cmocka

cmocka

JSON →
library2.0.2vcpkgunverified

An elegant unit testing framework for C with support for mock objects.

vcpkg install cmocka
INSTALL
IMPORT
SIG · CMOCKA
C
cmocka
testingcppv2.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cmocka.h
#include <cmocka.h>

Simple test that checks NULL is null.

#include <stdarg.h> #include <stddef.h> #include <setjmp.h> #include <cmocka.h> static void test_null(void **state) { (void) state; assert_null(NULL); } int main() { const struct CMUnitTest tests[] = { cmocka_unit_test(test_null), }; return cmocka_run_group_tests(tests, NULL, NULL); }
Debug
Known issues
gotchacmocka requires linking with the library; it is not header-only.
fix
Ensure target_link_libraries includes cmocka::cmocka.
affects: *
Upgrade
Version history
2.0.2latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources

No resource links recorded.

cmocka — pip install cmocka · libregistry