7#ifndef ENGINE_TESTRUNNER
8#define ENGINE_TESTRUNNER
11#define STRINGIFY(A) EXPAND(A)
57 std::function<void()> test;
60 bool m_currentSuccess =
true;
62 std::vector<Test> m_tests;
63 unsigned int m_passedTests = 0;
64 std::string m_testName;
66 std::vector<std::string> m_logs;
87 void addTest(std::string name, std::function<
void()> test);
122 void Assert(
bool condition, std::string message);
A Unit tester used to run C++ unit tests.
Definition Testing.hpp:53
void DebugLog(std::string message)
Definition Testing.cpp:48
unsigned int getTestCount()
Definition Testing.cpp:73
unsigned int getPassedTestCount()
Definition Testing.cpp:77
void addTest(std::string name, std::function< void()> test)
Definition Testing.cpp:18
void Assert(bool condition, std::string message)
Definition Testing.cpp:57
void PrintLogs()
Definition Testing.cpp:63
static TestRunner & getInstance(std::string name="Test")
Definition Testing.cpp:11
void DebugError(std::string message)
Definition Testing.cpp:52
void runTests()
Definition Testing.cpp:22