#define CODE_ERROR_LOCATIONS #include "Errors.hpp" #include #include #include "Logger.hpp" using namespace nb; class TestError : public ErrorBase { public: using ErrorBase::ErrorBase; enum ErrorCodes : unsigned int { A, B, C, D }; static const std::string type; static const ErrorCodeMap ErrorMessages; }; const std::string TestError::type="TestError"; const ErrorCodeMap TestError::ErrorMessages{ {TestError::ErrorCodes::A, "Hey!"}, {TestError::ErrorCodes::B, "How"}, {TestError::ErrorCodes::C, "You"}, {TestError::ErrorCodes::D, "Doin"} }; TEST(ErrorTest, Test) { EXPECT_EQ(1, 1); nb::DebugLogger log(std::cout); ASSERT_TRUE(log.run()); ASSERT_TRUE(log.isRunning()); while (!log.isRunning()){ 1+1; } log.log("Hey!"); }