#ifndef CORE_TEST_H #define CORE_TEST_H #include "utils/Logger.h" namespace Core { class Test final { int tests; int successTests; const char* name; public: Test(const char* name); void finalize(); template void checkEqual(const T& wanted, const T& actual, const char* text) { tests++; if(wanted == actual) { successTests++; } else { (void)text; CORE_LOG_ERROR("# Test #: # - expected '#' got '#'", name, tests, text, wanted, actual) } } void checkEqual(float wanted, float actual, const char* text); void checkFloat(float wanted, float actual, float error, const char* text); void checkTrue(bool actual, const char* text); void checkFalse(bool actual, const char* text); }; } #endif