mirror of
https://github.com/KjellKod/g3log.git
synced 2024-12-12 10:23:50 +01:00
fix unit tests
This commit is contained in:
parent
f3dda737ed
commit
c2ba2546bb
@ -245,6 +245,7 @@ TEST(LogTest, LOG_IF__FATAL) {
|
||||
TEST(LogTest, LOG_IF__FATAL__NO_THROW) {
|
||||
RestoreFileLogger logger(log_directory);
|
||||
LOG_IF(FATAL, (2 > 3)) << "This message%sshould NOT throw";
|
||||
logger.reset();
|
||||
ASSERT_FALSE(mockFatalWasCalled());
|
||||
}
|
||||
|
||||
@ -304,6 +305,7 @@ TEST(CHECK, CHECK_ThatWontThrow) {
|
||||
|
||||
CHECK(1 == 1);
|
||||
CHECK_F(1 == 1, msg.c_str(), "message", "log");
|
||||
logger.reset();
|
||||
EXPECT_FALSE(mockFatalWasCalled());
|
||||
|
||||
std::string file_content = readFileToText(logger.logFile());
|
||||
|
@ -50,7 +50,7 @@ TEST(ConceptSink, OneHundredSinks) {
|
||||
}
|
||||
|
||||
{
|
||||
RestoreFileLogger logger{"/tmp"};
|
||||
RestoreFileLogger logger{"./"};
|
||||
g2::LogWorker* worker = logger._scope->get(); //g2LogWorker::createWithNoSink();
|
||||
size_t index = 0;
|
||||
for (auto& flag : flags) {
|
||||
@ -69,6 +69,8 @@ TEST(ConceptSink, OneHundredSinks) {
|
||||
write2.append("Hello to 100 receivers :)");
|
||||
worker->save(message2);
|
||||
LOG(INFO) << "end message";
|
||||
|
||||
logger.reset();
|
||||
}
|
||||
// at the curly brace above the ScopedLogger will go out of scope and all the
|
||||
// 100 logging receivers will get their message to exit after all messages are
|
||||
|
Loading…
Reference in New Issue
Block a user