summaryrefslogtreecommitdiff
path: root/asl/testing/testing.hpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2024-10-28 23:52:48 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2024-12-20 15:35:58 +0100
commit2a10eaae094e48a157d55ec886aaa07b0d0be6c9 (patch)
treee334ce5d2de1604eb168a3269be887bbc078df70 /asl/testing/testing.hpp
parent46cc6bfc5f62bb45427ef7778ba5fc04d7a546da (diff)
Some work on test framework & option
Diffstat (limited to 'asl/testing/testing.hpp')
-rw-r--r--asl/testing/testing.hpp8
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__); }