mirror of
https://github.com/KjellKod/g3log.git
synced 2024-12-14 02:57:46 +01:00
Fixed formatting unit tests
This commit is contained in:
parent
403f3cb94f
commit
d936bc2763
@ -518,7 +518,7 @@ TEST(CustomLogLevels, AddANonFatal) {
|
|||||||
logger.reset();
|
logger.reset();
|
||||||
std::string file_content = readFileToText(logger.logFile());
|
std::string file_content = readFileToText(logger.logFile());
|
||||||
std::string expected;
|
std::string expected;
|
||||||
expected += "MY_INFO_LEVEL [test_io.cpp L: " + std::to_string(line);
|
expected += "MY_INFO_LEVEL [test_io.cpp:" + std::to_string(line);
|
||||||
EXPECT_TRUE(verifyContent(file_content, expected)) << file_content
|
EXPECT_TRUE(verifyContent(file_content, expected)) << file_content
|
||||||
<< "\n\nExpected: \n" << expected;
|
<< "\n\nExpected: \n" << expected;
|
||||||
}
|
}
|
||||||
@ -541,7 +541,7 @@ TEST(CustomLogLevels, AddFatal) {
|
|||||||
|
|
||||||
std::string file_content = readFileToText(logger.logFile());
|
std::string file_content = readFileToText(logger.logFile());
|
||||||
std::string expected;
|
std::string expected;
|
||||||
expected += "DEADLY [test_io.cpp L: " + std::to_string(line);
|
expected += "DEADLY [test_io.cpp:" + std::to_string(line);
|
||||||
EXPECT_TRUE(verifyContent(file_content, expected)) << file_content
|
EXPECT_TRUE(verifyContent(file_content, expected)) << file_content
|
||||||
<< "\n\nExpected: \n" << expected;
|
<< "\n\nExpected: \n" << expected;
|
||||||
g_fatal_counter.store(0); // restore
|
g_fatal_counter.store(0); // restore
|
||||||
@ -585,7 +585,7 @@ TEST(CustomLogLevels, AddANonFatal__DidNotAddItToEnabledValue1) {
|
|||||||
|
|
||||||
std::string file_content = readFileToText(logger.logFile());
|
std::string file_content = readFileToText(logger.logFile());
|
||||||
std::string expected;
|
std::string expected;
|
||||||
expected += "MY_INFO_LEVEL [test_io.cpp L: " + std::to_string(line);
|
expected += "MY_INFO_LEVEL [test_io.cpp:" + std::to_string(line);
|
||||||
EXPECT_FALSE(verifyContent(file_content, expected)) << file_content
|
EXPECT_FALSE(verifyContent(file_content, expected)) << file_content
|
||||||
<< "\n\nExpected: \n" << expected << "\nLevels:\n" << g3::only_change_at_initialization::printLevels();
|
<< "\n\nExpected: \n" << expected << "\nLevels:\n" << g3::only_change_at_initialization::printLevels();
|
||||||
}
|
}
|
||||||
@ -599,7 +599,7 @@ TEST(CustomLogLevels, AddANonFatal__DidNotAddItToEnabledValue2) {
|
|||||||
|
|
||||||
std::string file_content = readFileToText(logger.logFile());
|
std::string file_content = readFileToText(logger.logFile());
|
||||||
std::string expected;
|
std::string expected;
|
||||||
expected += "MY_INFO_LEVEL [test_io.cpp L: " + std::to_string(line);
|
expected += "MY_INFO_LEVEL [test_io.cpp:" + std::to_string(line);
|
||||||
EXPECT_FALSE(verifyContent(file_content, expected)) << file_content
|
EXPECT_FALSE(verifyContent(file_content, expected)) << file_content
|
||||||
<< "\n\nExpected: \n" << expected << "\nLevels:\n" << g3::only_change_at_initialization::printLevels();
|
<< "\n\nExpected: \n" << expected << "\nLevels:\n" << g3::only_change_at_initialization::printLevels();
|
||||||
}
|
}
|
||||||
@ -612,7 +612,7 @@ TEST(CustomLogLevels, AddANonFatal__DidtAddItToEnabledValue) {
|
|||||||
logger.reset();
|
logger.reset();
|
||||||
std::string file_content = readFileToText(logger.logFile());
|
std::string file_content = readFileToText(logger.logFile());
|
||||||
std::string expected;
|
std::string expected;
|
||||||
expected += "MY_INFO_LEVEL [test_io.cpp L: " + std::to_string(line);
|
expected += "MY_INFO_LEVEL [test_io.cpp:" + std::to_string(line);
|
||||||
EXPECT_TRUE(verifyContent(file_content, expected)) << file_content
|
EXPECT_TRUE(verifyContent(file_content, expected)) << file_content
|
||||||
<< "\n\nExpected: \n" << expected;
|
<< "\n\nExpected: \n" << expected;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user