summaryrefslogtreecommitdiff
path: root/lily-test.h
diff options
context:
space:
mode:
Diffstat (limited to 'lily-test.h')
-rw-r--r--lily-test.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lily-test.h b/lily-test.h
index c26237a..6aafb8f 100644
--- a/lily-test.h
+++ b/lily-test.h
@@ -160,6 +160,12 @@ void lily_check(int x, const char *location, const char *fmt, ...);
xstr, ystr, xstr, x, ystr, y, lily_g.epsilon)
#define CHECK_EQF(x, y, fmt) LILY_CHECK_EQF(x, y, #x, #y, fmt)
+#define LILY_CHECK_EQS(x, y, xstr, ystr) \
+ lily_check(strcmp(x, y) == 0, LILY_LOCATION, \
+ "CHECK failed: %s == %s\n %s = \"%s\"\n %s = \"%s\"", \
+ xstr, ystr, xstr, x, ystr, y)
+#define CHECK_EQS(x, y) LILY_CHECK_EQS(x, y, #x, #y)
+
void lily_require(int x, const char *location, const char *fmt, ...);
#define LILY_REQUIRE_(str, x, location) \