Add "do ... while(0)" around CHECK_ETC test macros
diff --git a/test/c/testlib/testlib.c b/test/c/testlib/testlib.c
index 9dc8e7e..853d23a 100644
--- a/test/c/testlib/testlib.c
+++ b/test/c/testlib/testlib.c
@@ -66,20 +66,20 @@
msg += snprintf(msg, sizeof(fail_msg) - (msg - fail_msg), ##__VA_ARGS__)
#define CHECK_STATUS(prefix, status) \
- { \
+ do { \
wuffs_base__status z = status; \
if (z.repr) { \
RETURN_FAIL("%s: \"%s\"", prefix, z.repr); \
} \
- }
+ } while (0)
#define CHECK_STRING(string) \
- { \
+ do { \
const char* z = string; \
if (z) { \
return z; \
} \
- }
+ } while (0)
int tests_run = 0;