cmockery2

C unit testing framework with mocking capabilities for Google's cmockery

brewmacoslinux
Try with needOr install directly
Source

About

Reviving cmockery unit test framework from Google

Commands

cmockery2

Examples

Compile a test file with cmockery2 library$ gcc -o test_program test.c -lcmockery2
Run compiled unit tests with verbose output$ ./test_program -v
Link cmockery2 in a makefile project$ gcc -o mytest mytest.c -lcmockery2 -lm