26#define GREEN "\033[0;32m";
27#define RED "\033[0;31m";
29#define MSG_ASS_FAILED " Assertion \033[0;31mFAILED\033[0m: "
30#define MSG_FAILED "\033[0;31mFAILED\033[0m"
31#define MSG_PASSED "\033[0;32mPASSED\033[0m"
98 template <
typename ExceptionType,
typename Callable>
104 }
catch (
const ExceptionType &e) {
basic_ostream< _CharT, _Traits > & endl(basic_ostream< _CharT, _Traits > &__os)
A custom class for performing unit tests and reporting results.
void expectEq(const T &val1, const T &val2, const std::string &message)
Asserts that two values are equal.
void expectTrue(const T &condition, const std::string &message)
Asserts that a condition is true.
~Test()
Destructor for the Test class.
Test()
Default constructor for the Test class.
void runTest(const std::string &testName, void(*testFunction)(Test &))
Runs a single test case.
void expectThrow(Callable statement, const std::string &message)
Asserts that a statement throws an exception of the specified type.