aboutsummaryrefslogtreecommitdiff
path: root/zencore-test/zencore-test.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2022-05-20 18:45:35 +0200
committerGitHub <[email protected]>2022-05-20 18:45:35 +0200
commitf0d389a4430b62bfa8ea0852905fcf84065b08c2 (patch)
tree450344815e7bb7c3dde0d94f6032f048f3430527 /zencore-test/zencore-test.cpp
parentfix mac compilation error (diff)
downloadzen-f0d389a4430b62bfa8ea0852905fcf84065b08c2.tar.xz
zen-f0d389a4430b62bfa8ea0852905fcf84065b08c2.zip
Add catch2 support (#101)
Added option to use catch2 for unit tests Currently both doctest and catch2 are supported via some compatibility macros. doctest is the default, and ZEN_USE_CATCH2 needs to be defined to switch to catch2. Our goal is to evaluate how well catch2 works and switch to catch2 if everything pans out since UE5 now supports using catch2 for unit tests.
Diffstat (limited to 'zencore-test/zencore-test.cpp')
-rw-r--r--zencore-test/zencore-test.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/zencore-test/zencore-test.cpp b/zencore-test/zencore-test.cpp
index 7d7365c54..53413fb25 100644
--- a/zencore-test/zencore-test.cpp
+++ b/zencore-test/zencore-test.cpp
@@ -7,9 +7,8 @@
#include <zencore/zencore.h>
#if ZEN_WITH_TESTS
-# define DOCTEST_CONFIG_IMPLEMENT
+# define ZEN_TEST_WITH_RUNNER 1
# include <zencore/testing.h>
-# undef DOCTEST_CONFIG_IMPLEMENT
#endif
int
@@ -20,7 +19,7 @@ main([[maybe_unused]] int argc, [[maybe_unused]] char* argv[])
zen::logging::InitializeLogging();
- return doctest::Context(argc, argv).run();
+ return ZEN_RUN_TESTS(argc, argv);
#else
return 0;
#endif