#define CODE_ERROR_LOCATIONS #include "Errors.hpp" #include #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); std::stringstream sstream; ASSERT_TRUE(nb::logger.isRunning()); nb::logger.log("Hey!"); }