From f5b609cac864e010085d5965b84832b2d85643e6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 20 Jan 2014 16:03:30 -0800 Subject: Make the printing of complex byte arrays prettier Similar to what we've done to QString, only we print each byte that is not ASCII as \OOO (octal representation). [ChangeLog][QtTest] QtTest now prints an escaped version of QByteArrays that failed to compare with QCOMPARE, instead of the hex dump. Change-Id: I6a8c43f138c66c998280998a242b43cd579666a0 Reviewed-by: Richard J. Moore --- tests/auto/testlib/selftests/tst_selftests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/testlib/selftests/tst_selftests.cpp') diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index acd3faaa45..488b65c657 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -746,7 +746,7 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge .arg(i).arg(loggers.at(n), output))); } else { QVERIFY2(output == expected, - qPrintable(QString::fromLatin1("Mismatch at line %1 (%2, %3): '%4' != '%5'") + qPrintable(QString::fromLatin1("Mismatch at line %1 (%2, %3):\n'%4'\n !=\n'%5'") .arg(i + 1).arg(loggers.at(n), expectedFileName, output, expected))); } -- cgit v1.2.3