summaryrefslogtreecommitdiff
path: root/asl/testing/testing.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'asl/testing/testing.hpp')
-rw-r--r--asl/testing/testing.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/asl/testing/testing.hpp b/asl/testing/testing.hpp
new file mode 100644
index 0000000..a489d61
--- /dev/null
+++ b/asl/testing/testing.hpp
@@ -0,0 +1,15 @@
+#pragma once
+
+namespace asl::testing
+{
+
+using TestFunction = void();
+int register_test(const char* suite_name, const char* case_name, TestFunction* fn);
+
+} // namespace asl::testing
+
+#define ASL_TEST(SUITE, CASE) \
+ static void asl_test_fn_##SUITE##_##CASE(); \
+ static const int asl_test_##SUITE##_##CASE = ::asl::testing::register_test( \
+ #SUITE, #CASE, asl_test_fn_##SUITE##_##CASE); \
+ void asl_test_fn_##SUITE##_##CASE()