diff options
Diffstat (limited to 'test_util.h')
| -rw-r--r-- | test_util.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test_util.h b/test_util.h index f3247aa..2a652de 100644 --- a/test_util.h +++ b/test_util.h @@ -63,12 +63,15 @@ return 0; \ } +#define FG_RED "\x1b[31m" +#define FG_RESET "\x1b[39m" + #define ASSERT(X) \ do { \ if (!(X)) { \ - fprintf(stderr, "assertion %s failed at %s:%d\n", \ + fprintf(stderr, FG_RED "assertion %s failed at %s:%d\n" FG_RESET, \ #X, __FILE__, __LINE__); \ - exit(1); \ + return; \ } \ } while (0) @@ -77,7 +80,7 @@ if (!(X)) { \ fprintf(stderr, "assertion %s failed at %s:%d (" FMT ")\n", \ #X, __FILE__, __LINE__, ##__VA_ARGS__); \ - exit(1); \ + return; \ } \ } while (0) |
