From 8c95db33be58a545dd2e030428bded0bd958c4b6 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Wed, 16 Oct 2024 22:54:34 +0200 Subject: Start work on the testing framework --- asl/testing/testing.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 asl/testing/testing.hpp (limited to 'asl/testing/testing.hpp') 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() -- cgit