10 #if defined ENABLE_CATCH
11 # include <catch2/catch_all.hpp>
13 static Catch::Session session;
19 Catch::ConfigData& config = session.configData();
20 config.testsOrTags.clear();
21 config.testsOrTags.push_back(
"[fast]");
22 session.useConfigData(config);
31 Catch::ConfigData& config = session.configData();
32 config.testsOrTags.clear();
33 config.testsOrTags.push_back(
"~[slow]");
34 session.useConfigData(config);
40 printf(
"Elapsed time for not slow tests: %g s", (
double)(t2 - t1) / CLOCKS_PER_SEC);
50 Catch::ConfigData& config = session.configData();
51 config.testsOrTags.clear();
52 for (
unsigned int i = 0; i < tests_or_tags.size(); i++) {
53 config.testsOrTags.push_back(tests_or_tags[i]);
55 session.useConfigData(config);
61 printf(
"Elapsed time for user defined tests: %g s", (
double)(t2 - t1) / CLOCKS_PER_SEC);
71 Catch::ConfigData& config = session.configData();
72 config.testsOrTags.clear();
74 session.useConfigData(config);