diff options
Diffstat (limited to 'src/unittest.h')
-rw-r--r-- | src/unittest.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/unittest.h b/src/unittest.h new file mode 100644 index 0000000..d2fd4ad --- /dev/null +++ b/src/unittest.h @@ -0,0 +1,18 @@ +#include <stdio.h> +#include <stdbool.h> + +#define RED "\x1B[31m" +#define GRN "\x1B[32m" +#define RESET "\x1B[0m" + +#define PASS "PASS!" +#define FAIL "FAIL!" +#define DEFAULT_ASSERT_MESSAGE "Assertion failed!" + +#define draw(COLOR, TEXT) COLOR TEXT RESET + +bool assert(bool expression, const char* message); + +void unit_test(bool expression, const char* subject); + +bool report(); |