diff options
Diffstat (limited to 'asl/testing/testing.hpp')
-rw-r--r-- | asl/testing/testing.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/asl/testing/testing.hpp b/asl/testing/testing.hpp index 4fe44df..bf8f54e 100644 --- a/asl/testing/testing.hpp +++ b/asl/testing/testing.hpp @@ -36,3 +36,11 @@ struct Test #CASE, \
asl_test_fn_##CASE); \
void asl_test_fn_##CASE()
+
+#define ASL_TEST_ASSERT(EXPR) \
+ if (EXPR) {} \
+ else { ::asl::testing::report_failure(#EXPR, __FILE__, __LINE__); return; }
+
+#define ASL_TEST_EXPECT(EXPR) \
+ if (EXPR) {} \
+ else { ::asl::testing::report_failure(#EXPR, __FILE__, __LINE__); }
|