diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-07-21 17:06:53 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-07-21 17:09:42 +0200 |
| commit | 0be32393e54bed6bbf5890edba72b8808d276289 (patch) | |
| tree | ba83502753e64f0c60f5202a8d224b57b52cf14f /testing.h | |
| parent | 85b0db24804e6a8a66f557ac8917596db5fc5d9f (diff) | |
format
Diffstat (limited to 'testing.h')
| -rw-r--r-- | testing.h | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -1,13 +1,16 @@ #include <stdio.h> #define t_assert(fact) \ - if (!(fact)) { \ - fprintf(stderr, "Assertion failed: %s at %s:%d in %s()\n", #fact, __FILE__, __LINE__, __func__); \ - return 1; \ - } + if (!(fact)) { \ + fprintf(stderr, "Assertion failed: %s at %s:%d in %s()\n", #fact, \ + __FILE__, __LINE__, __func__); \ + return 1; \ + } - # define t_assert_equal(a, b) \ - if (!(a == b)) { \ - fprintf(stderr, "Assertion failed: %d (%s) != %d (%s) at %s:%d in %s()\n", a, #a, b, #b, __FILE__, __LINE__, __func__); \ - return 1; \ - } +#define t_assert_equal(a, b) \ + if (!(a == b)) { \ + fprintf(stderr, \ + "Assertion failed: %d (%s) != %d (%s) at %s:%d in %s()\n", a, \ + #a, b, #b, __FILE__, __LINE__, __func__); \ + return 1; \ + } |
