QTestLog: simplify construction of a log message
Change-Id: I055efa45ec468cae43a38a9746a47af0382ca8c1 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
89225c951e
commit
2b3782132f
@ -75,6 +75,8 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
using namespace Qt::StringLiterals;
|
||||||
|
|
||||||
static void saveCoverageTool(const char * appname, bool testfailed, bool installedTestCoverage)
|
static void saveCoverageTool(const char * appname, bool testfailed, bool installedTestCoverage)
|
||||||
{
|
{
|
||||||
#ifdef __COVERAGESCANNER__
|
#ifdef __COVERAGESCANNER__
|
||||||
@ -328,10 +330,11 @@ void QTestLog::printUnhandledIgnoreMessages()
|
|||||||
QTest::IgnoreResultList *list = QTest::ignoreResultList;
|
QTest::IgnoreResultList *list = QTest::ignoreResultList;
|
||||||
while (list) {
|
while (list) {
|
||||||
if (list->pattern.userType() == QMetaType::QString) {
|
if (list->pattern.userType() == QMetaType::QString) {
|
||||||
message = QStringLiteral("Did not receive message: \"") + list->pattern.toString() + u'"';
|
message = "Did not receive message: \"%1\""_L1.arg(list->pattern.toString());
|
||||||
} else {
|
} else {
|
||||||
#if QT_CONFIG(regularexpression)
|
#if QT_CONFIG(regularexpression)
|
||||||
message = QStringLiteral("Did not receive any message matching: \"") + list->pattern.toRegularExpression().pattern() + u'"';
|
message = "Did not receive any message matching: \"%1\""_L1.arg(
|
||||||
|
list->pattern.toRegularExpression().pattern());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
FOREACH_TEST_LOGGER
|
FOREACH_TEST_LOGGER
|
||||||
|
Loading…
x
Reference in New Issue
Block a user