3#if defined (HART_IMPLEMENTATION)
4#define DR_WAV_IMPLEMENTATION
10#include "dsp/hart_dsp_all.hpp"
12#include "envelopes/hart_envelopes_all.hpp"
15#include "matchers/hart_matchers_all.hpp"
17#include "signals/hart_signals_all.hpp"
29#define HART_FAIL_TEST_MSG(message) throw hart::TestAssertException (std::string ("HART_FAIL_TEST_MSG() triggered test fail at line ") + std::to_string (__LINE__) + " with message: \"" + message + '\"')
33#define HART_FAIL_TEST() throw hart::TestAssertException (std::string ("HART_FAIL_TEST() triggered test fail at line ") + std::to_string (__LINE__))
39#define HART_ASSERT_TRUE(condition)
40 if (!(condition)) throw hart::TestAssertException (std::string ("HART_ASSERT_TRUE() failed at line ") + std::to_string (__LINE__) + ": \"" #condition "\"");
46#define HART_EXPECT_TRUE(condition)
47 if (!(condition)) hart::ExpectationFailureMessages::get().emplace_back (std::string ("HART_EXPECT_TRUE() failed at line ") + std::to_string (__LINE__) + ": \"" #condition "\"");
49#define HART_CONCAT_IMPL(x, y) x##y
53#define HART_ITEM_WITH_TAGS(name, tags, category)
58 hart::TestRegistry::getInstance().add (name, tags, __FILE__, __LINE__, category, &HART_UNIQUE_ID (HART_RunTask));
78#define HART_GENERATE_WITH_TAGS(name, tags) HART_ITEM_WITH_TAGS(name, tags, hart::TaskCategory::generate)
91#if HART_DO_NOT_THROW_EXCEPTIONS
95#define HART_REQUIRES_DATA_PATH_ARG if (hart::CLIConfig::getInstance().getDataRootPath().empty()) { hart::ExpectationFailureMessages::get().emplace_back ("This test requires a data path set by the --data-root-path CLI argument, but it's empty"); return; }
100#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"); }
106#define HART_RUN_ALL_TESTS(argc, argv)
109 hart::CLIConfig::getInstance().initCommandLineArgs();
110 CLI11_PARSE
(hart::CLIConfig::getInstance().getCLIApp(), argc, argv);
111 return hart::TestRegistry::getInstance().runAll();
116#define HART_DECLARE_ALIASES_FOR_FLOAT using namespace hart::aliases_float
119#define HART_DECLARE_ALIASES_FOR_DOUBLE using namespace hart::aliases_double
#define HART_GENERATE_WITH_TAGS(name, tags)
Declares a generator with tags.
#define HART_TEST_WITH_TAGS(name, tags)
Declares a test case with tags.
#define HART_CONCAT(x, y)
#define HART_UNIQUE_ID(x)
#define HART_CONCAT_IMPL(x, y)
#define HART_ITEM_WITH_TAGS(name, tags, category)