aboutsummaryrefslogtreecommitdiff
path: root/testing.h
diff options
context:
space:
mode:
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; \
+ }