diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-04-08 13:14:27 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-04-08 13:15:01 +0200 |
| commit | cf534d762754860ed5b714974f99acd282d48b3b (patch) | |
| tree | bf22341cedfb50ee7bcd4e15f85add2329783f31 /include/testing.h | |
| parent | 630fcb1846aed16b9ab62bcf700f668883f4521f (diff) | |
Restructure into src/{std,json}/
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'include/testing.h')
| -rw-r--r-- | include/testing.h | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/include/testing.h b/include/testing.h deleted file mode 100644 index 1ca460b..0000000 --- a/include/testing.h +++ /dev/null @@ -1,36 +0,0 @@ -#pragma once -#include <stdio.h> -#include <string.h> - -#include "../include/memory.h" - -typedef struct { - size size; - byte *content; -} MemoryFile; -MemoryFile load_file(Arena *a, const char *filename); - -#define t_assert_equal(a, b) \ - if (!(a == b)) { \ - fprintf(stderr, \ - "Assertion failed: %d (%s) != %d (%s) at %s:%d in %s()\n", \ - (i32)a, #a, (i32)b, #b, __FILE__, __LINE__, __func__); \ - return 1; \ - } - -#define t_assert_fequal(a, b) \ - if ((a - b) > 1e-6 || (b - a) > 1e-6) { \ - fprintf(stderr, \ - "Assertion failed: %f (%s) != %f (%s) at %s:%d in %s()\n", a, \ - #a, b, #b, __FILE__, __LINE__, __func__); \ - return 1; \ - } - -#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__); \ - return 1; \ - } |
