diff options
Diffstat (limited to 'lily-test.h')
-rw-r--r-- | lily-test.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lily-test.h b/lily-test.h index 265c653..062631b 100644 --- a/lily-test.h +++ b/lily-test.h @@ -145,7 +145,7 @@ void lily_check(int x, const char *location, const char *fmt, ...); #define CHECK(x) LILY_CHECK(x) #define LILY_CHECK_CMP_(x, y, xstr, ystr, cmp, cmpstr, fmt) \ - lily_check(x cmp y, LILY_LOCATION, \ + lily_check((x) cmp (y), LILY_LOCATION, \ "CHECK failed: %s " cmpstr " %s\n %s = " fmt "\n %s = " fmt,\ xstr, ystr, xstr, x, ystr, y) #define LILY_CHECK_CMP(x, cmp, y, fmt) LILY_CHECK_CMP_(x, y, #x, #y, cmp, #cmp, fmt) @@ -178,7 +178,7 @@ void lily_require(int x, const char *location, const char *fmt, ...); #define REQUIRE(x) LILY_REQUIRE(x) #define LILY_REQUIRE_CMP_(x, y, xstr, ystr, cmp, cmpstr, fmt) \ - lily_require(x cmp y, LILY_LOCATION, \ + lily_require((x) cmp (y), LILY_LOCATION, \ "REQUIRE failed: %s " cmpstr " %s\n %s = " fmt "\n %s = " fmt,\ xstr, ystr, xstr, x, ystr, y) #define LILY_REQUIRE_CMP(x, cmp, y, fmt) LILY_REQUIRE_CMP_(x, y, #x, #y, cmp, #cmp, fmt) |