aboutsummaryrefslogtreecommitdiff
path: root/testing.h
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2025-07-21 17:06:53 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2025-07-21 17:09:42 +0200
commit0be32393e54bed6bbf5890edba72b8808d276289 (patch)
treeba83502753e64f0c60f5202a8d224b57b52cf14f /testing.h
parent85b0db24804e6a8a66f557ac8917596db5fc5d9f (diff)
format
Diffstat (limited to 'testing.h')
-rw-r--r--testing.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/testing.h b/testing.h
index 0b479c9..3fc5df5 100644
--- a/testing.h
+++ b/testing.h
@@ -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; \
+ }