tst_qlogging (tst_qmessagehandler): use one line for output and expected
Makes it easier to interpret the output from the test, because of embedded newlines. Pick-to: 6.3 Change-Id: Ic15405335d804bdea761fffd16d4f141e09537f4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
43a171a7d6
commit
5731b83445
|
|
@ -799,9 +799,10 @@ void tst_qmessagehandler::qMessagePattern()
|
|||
|
||||
for (const QByteArray &e : qAsConst(expected)) {
|
||||
if (!output.contains(e)) {
|
||||
qDebug() << output;
|
||||
qDebug() << "expected: " << e;
|
||||
QVERIFY(output.contains(e));
|
||||
// use QDebug so we get proper string escaping for the newlines
|
||||
QString buf;
|
||||
QDebug(&buf) << "Got:" << output << "; Expected:" << e;
|
||||
QVERIFY2(output.contains(e), qPrintable(buf));
|
||||
}
|
||||
}
|
||||
if (pattern.startsWith("%{pid}"))
|
||||
|
|
|
|||
Loading…
Reference in New Issue