Confer is a C and C++ unit testing library written in C. It is currently only available on Linux, and limited to GCC.
Confer comes with a number of tools and feaures out of the box.
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) {
cf_init(); // nothing more needed
cf_test(test_my_function); // call subtests
cf_print_call_tree(); // show the results
}
void test_my_function(CFTEST) { // make it a test
assert_int_equal(my_function(0), 1);
assert_int_greater(my_function(2), 7);
}
To know more about the library, we also recommend you visiting Confer's documentation. For a fast overview of Confer's capacity, you can also check the example.
Feel free to open issues on the Github Repo, especially if you did not find an answer to a question in our documentation.
Powered by Doctave