diff options
Diffstat (limited to 'src/include/test.h')
-rw-r--r-- | src/include/test.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/include/test.h b/src/include/test.h deleted file mode 100644 index e862467..0000000 --- a/src/include/test.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef TEST_H -#define TEST_H - -#include "util.h" - -#ifdef TEST - -unsigned int TESTS_RUN = 0; -unsigned int TESTS_PASSED = 0; - -#define ASSERT(EXPR) \ - TESTS_RUN++; \ - (EXPR && ++TESTS_PASSED) ? \ - log_yay("Assertion passed!") : \ - log_err("%s:%d: Assertion failed:\n\t%s", __FILE__, __LINE__, #EXPR); - -#define TEST_REPORT \ - (TESTS_RUN == TESTS_PASSED) ? \ - log_yay("All %d tests passed!", TESTS_RUN) : \ - log_err("%d/%d tests failed.", TESTS_RUN - TESTS_PASSED, TESTS_RUN); - -#else -#define ASSERT(EXPR) NULL; -#define TEST_REPORT NULL; -#endif - -#endif |