When cryb-test is used as a framework for another project, the compile-time test is useless since cryb-test itself will have been built with coverage disabled. Besides, it is not a reliable indicator of whether leak detection will work. Instead, check if the heap is already dirty when we first gain control.
Not only is this a slightly more logical name, but it allows us to expose the verbose flag, previously private to cryb_t_main.c, as the equally logically named t_verbose.
Unlike assert(3), which uses abort(3), this has no other side effects (before raising SIGABRT) than an fprintf() call. The test framework will catch the SIGABRT, report that the test case failed, and proceed with the next case.
Instead of having libcryb-test provide main() and assume that the test program defines t_prepare() and t_cleanup(), have libcryb-test provide a t_main() function which the test program calls with pointers to its prepare and cleanup functions.
a caller-provided buffer. Use it to warn about leaks in each individual
test case. Note that we can't fail a test case for leaking, because
individual test cases in a unit may modify shared state which is cleaned
up at the end of the series.