#include #define mu_assert(message, test)\ do {\ if (!(test)) return message;\ } while (0) #define mu_run_test(test) \ do {\ char *message = test(); \ if (message) {\ printf("fail " #test "\n%s\n", message);\ tests_fail++;\ } else {\ printf("ok " #test "\n");\ tests_ok++;\ }\ } while (0) extern int tests_ok; extern int tests_fail; /** * Statically (or somehow) build a list of test functions that are executed when * main() is run */