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. Change-Id: Ic15405335d804bdea761fffd16d4f141e09537f4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 5731b83445d890c5316c16cd3a16cd2f5bca2fbd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
31e19aa440
commit
9de4ef9d46
@ -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…
x
Reference in New Issue
Block a user