summaryrefslogtreecommitdiff
path: root/test/unit/test.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/test.h')
-rw-r--r--test/unit/test.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/test.h b/test/unit/test.h
index f409252..2d3637b 100644
--- a/test/unit/test.h
+++ b/test/unit/test.h
@@ -33,7 +33,16 @@ extern void test_unit(void);
} \
} while (0)
+#define TEST_REQUIRE(expr) \
+ do { \
+ if (!(expr)) { \
+ TST_Skip(__LINE__); \
+ exit(0); \
+ } \
+ } while (0)
+
extern void TST_Fail(int line);
+extern void TST_Skip(int line);
extern void TST_SuspendLogging(void);
extern void TST_ResumeLogging(void);