Fix inaccurate coverage caused by LOG (#868)

Fix #845
This commit is contained in:
cyan317
2023-09-21 16:19:53 +01:00
committed by GitHub
parent 0eaaa1fb31
commit 44527140f0
3 changed files with 7 additions and 0 deletions

View File

@@ -57,6 +57,7 @@ TEST_F(LoggerTest, Filtering)
checkEqual("Trace:TRC Trace line logged for 'Trace' component");
}
#ifndef COVERAGE_ENABLED
TEST_F(LoggerTest, LOGMacro)
{
Logger log{"General"};
@@ -73,6 +74,7 @@ TEST_F(LoggerTest, LOGMacro)
log.trace() << compute();
EXPECT_TRUE(computeCalled);
}
#endif
TEST_F(NoLoggerTest, Basic)
{