diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-10-28 23:52:48 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-12-20 15:35:58 +0100 |
commit | 2a10eaae094e48a157d55ec886aaa07b0d0be6c9 (patch) | |
tree | e334ce5d2de1604eb168a3269be887bbc078df70 /asl/testing/testing.hpp | |
parent | 46cc6bfc5f62bb45427ef7778ba5fc04d7a546da (diff) |
Some work on test framework & option
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__); }
|