Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Oct 8, 2024
1 parent ef9d2c7 commit b94745f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions log/src/Logger_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ TEST(Logger, fileLogging)
std::filesystem::path logPath = logDir / logFile;

EXPECT_TRUE(logger.LogDestination().empty());
logger.SetLogDestination(logPath);
EXPECT_EQ(logPath, logger.LogDestination());
logger.SetLogDestination(logPath.string());
EXPECT_EQ(logPath.string(), logger.LogDestination());

logger.RawLogger().trace("trace\n");
logger.RawLogger().debug("debug\n");
Expand All @@ -154,7 +154,7 @@ TEST(Logger, fileLogging)
logger.RawLogger().critical("critical\n");

// Expect to find the string in the log file
std::string logContent = getLogContent(logPath);
std::string logContent = getLogContent(logPath.string());
for (auto word : {"trace", "debug", "info", "warn", "error", "critical"})
EXPECT_TRUE(logContent.find(word) != std::string::npos);
}

0 comments on commit b94745f

Please sign in to comment.