chore: LogTests, Fix codeQL issue with args in the printTestWithArgs test
This commit is contained in:
parent
490dac5048
commit
d1897efa8b
1 changed files with 2 additions and 2 deletions
|
|
@ -59,12 +59,12 @@ void LogTests::printTestWithArgs()
|
||||||
std::stringstream buffer;
|
std::stringstream buffer;
|
||||||
std::streambuf *old = std::cout.rdbuf(buffer.rdbuf());
|
std::streambuf *old = std::cout.rdbuf(buffer.rdbuf());
|
||||||
|
|
||||||
m_log.print(nullptr, 0, LEVEL_INFO "test %d %.2f %s", 1, 1.234, "test arg");
|
m_log.print(nullptr, 0, LEVEL_INFO "test %s", "IamARG");
|
||||||
|
|
||||||
auto string = sanitizeBuffer(buffer);
|
auto string = sanitizeBuffer(buffer);
|
||||||
std::cout.rdbuf(old);
|
std::cout.rdbuf(old);
|
||||||
|
|
||||||
QCOMPARE(string, "INFO: test 1 1.23 test arg");
|
QCOMPARE(string, "INFO: test IamARG");
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogTests::printTestLogString()
|
void LogTests::printTestLogString()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue