test-autotools-static/tests/minunit.h

9 lines
370 B
C
Raw Normal View History

2015-06-23 19:17:24 +02:00
#ifndef MINUNIT_H
#define MINUNIT_H
extern int tests_run;
#define mu_assert(message,test) do { if (!(test)) return message; } while (0)
2015-06-23 21:43:51 +02:00
#define mu_run_test(test_name, test) do { printf("# starting test %s\n", test_name); char *result = test(); tests_run++; if (result) {printf("not "); } printf("ok %d - %s\n", tests_run, test_name);} while (0)
2015-06-23 19:17:24 +02:00
#endif /* MINUNIT_H */