|
| #define | HART_FAIL_TEST_MSG(msg) throw hart::TestAssertException (std::string ("HART_FAIL_TEST_MSG() triggered test fail at line ") + std::to_string (__LINE__) + " with message: \"" + msg + '\"') |
| |
| #define | HART_FAIL_TEST() throw hart::TestAssertException (std::string ("HART_FAIL_TEST() triggered test fail at line ") + std::to_string (__LINE__)) |
| |
| #define | HART_ASSERT_TRUE(cond) if (!(cond)) throw hart::TestAssertException (std::string ("HART_ASSERT_TRUE() failed at line ") + std::to_string (__LINE__) + ": \"" #cond "\""); |
| |
| #define | HART_EXPECT_TRUE(cond) if (!(cond)) hart::ExpectationFailureMessages::get().emplace_back (std::string ("HART_EXPECT_TRUE() failed at line ") + std::to_string (__LINE__) + ": \"" #cond "\""); |
| |
| #define | HART_CONCAT_IMPL(x, y) x##y |
| |
| #define | HART_CONCAT(x, y) HART_CONCAT_IMPL(x, y) |
| |
| #define | HART_UNIQUE_ID(x) HART_CONCAT(x, __LINE__) |
| |
| #define | HART_ITEM_WITH_TAGS(name, tags, category) |
| |
| #define | HART_TEST_WITH_TAGS(name, tags) HART_ITEM_WITH_TAGS(name, tags, hart::TaskCategory::test) |
| | Declares a test case with tags.
|
| |
| #define | HART_GENERATE_WITH_TAGS(name, tags) HART_ITEM_WITH_TAGS(name, tags, hart::TaskCategory::generate) |
| | Declares a generator with tags.
|
| |
| #define | HART_TEST(name) HART_TEST_WITH_TAGS(name, "") |
| | Declares a test case.
|
| |
| #define | HART_GENERATE(name) HART_GENERATE_WITH_TAGS(name, "") |
| | Declares a generator.
|
| |
| #define | HART_REQUIRES_DATA_PATH_ARG if (hart::CLIConfig::getInstance().getDataRootPath().empty()) { throw hart::ConfigurationError ("This test requires a data path set by the --data-root-path CLI argument, but it's empty"); } |
| | Put it at the beginning of your tese case if it requires a properly set data path.
|
| |
| #define | HART_RUN_ALL_TESTS(argc, argv) |
| | Runs all tests or generators @prief Place this macro in your main() function.
|
| |
| #define | HART_DECLARE_ALIASES_FOR_FLOAT using namespace hart::aliases_float |
| | Put it before you test cases to use hart classes without hart:: namespace prefix and explicit <float> template value.
|
| |
| #define | HART_DECLARE_ALIASES_FOR_DOUBLE using namespace hart::aliases_double |
| | Put it before you test cases to use hart classes without hart:: namespace prefix and explicit <double> template value.
|
| |