aboutsummaryrefslogtreecommitdiff
path: root/testing.h
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2025-07-21 14:26:06 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2025-07-21 14:26:06 +0200
commit88eb8c969f6abe119994c7ab307b9be58ff076a5 (patch)
tree3a8fed52b29bdf12f5a6ac65393df8abb0c8f437 /testing.h
parenta378ff1b173f7a67272e574fb1a2c275ecb9661b (diff)
feat: JSON object parsing
Diffstat (limited to 'testing.h')
-rw-r--r--testing.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/testing.h b/testing.h
index cb40294..0b479c9 100644
--- a/testing.h
+++ b/testing.h
@@ -5,3 +5,9 @@
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; \
+ }