Confer is a C and C++ unit testing library written in C.
Confer comes with a number of tools and feaures out of the box.
- 20+ built-in assertions for most common types
- Custom assertions
- Fast build (...)
- Extra-light library written in C, no dynamic memory allocation (hence no memory leaks)
- A handy tool to manage projects and run tests (not compulsory)
To start using Confer, simply , and include it in your test file:
#include <confer.h>
Then, after calling the initialization function, you will be able to write your first tests:
void main(void) {
cfInit(); // nothing more needed
cfTest(test_my_function); // call subtests
cfPrintCallTree(); // show the results
}
void test_my_function(CFTEST) { // make it a test
assertIntEqual(my_function(0), 1);
assertIntGreater(my_function(2), 7);
}
To know more about the library, we also recommend you visiting Confer docs .
Feel free to open issues on the Github Repo, especially if you did not find an answer to a question in our documentation. You can also reach out directly to the maintainer via email at firefnix@gmail.com.