diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-08-23 22:12:28 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-08-27 11:46:25 +0200 |
| commit | 086cb73ef88a4962345b8284e47cea52da428135 (patch) | |
| tree | fceb159be84afd98e68494c69208226ecf240f7c /include | |
| parent | 37516080db6878bef6fb1e6c5542165f3f982792 (diff) | |
json keys typing & removed simple t_assert
Diffstat (limited to 'include')
| -rw-r--r-- | include/testing.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/include/testing.h b/include/testing.h index dc070d3..754733b 100644 --- a/include/testing.h +++ b/include/testing.h @@ -2,13 +2,6 @@ #include <stdio.h> #include <string.h> -#define t_assert(fact) \ - 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, \ @@ -25,10 +18,11 @@ return 1; \ } -#define t_assert_strequal(a, b) \ - if ((a.len != b.len) || (a.len && memcmp(a.data, b.data, a.len))) { \ +#define t_assert_strequal(a, b) \ + if ((a.len != b.len) || (a.len && memcmp(a.data, b.data, a.len))) { \ fprintf(stderr, \ - "Assertion failed: %.*s (%s) != %.*s (%s) at %s:%d in %s()\n", (i32)a.len, a.data, \ - #a, (i32)b.len, b.data, #b, __FILE__, __LINE__, __func__); \ + "Assertion failed: %.*s (%s) != %.*s (%s) at %s:%d in %s()\n", \ + (i32)a.len, a.data, #a, (i32)b.len, b.data, #b, __FILE__, \ + __LINE__, __func__); \ return 1; \ } |
