c-multihash/tests/c/minunit.h
Jakub Sztandera f91684f3c8 rework build structure for static link
make .gitignore exclude default
move tests into tests/c/
2016-07-26 10:57:05 +01:00

23 lines
507 B
C

/* vim: set ts=8 sw=8 noexpandtab: */
#include <stdio.h>
#define mu_assert(message, test) do { if (!(test)) return message; } while (0)
#define mu_run_test(test) do { char *message = test(); tests_run++; \
if (message) return message; } while (0)
int tests_run = 0;
static char *mu_all_tests(void);
int main(void) {
char *result = mu_all_tests();
if (result != 0) {
printf("%s\n", result);
}
else {
printf("ALL TESTS PASSED\n");
}
printf("Tests run: %d\n", tests_run);
return result != 0;
}