summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-01-02 14:53:36 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-07 19:21:45 +0100
commit8f80ff338ee53a2e66e55fd04c39c883c5f2d031 (patch)
treef93c35438522835834148eb5c4485e3b1e68d9f5 /tests
parent15ff120b027ea4ebac4791e234f03fb561c0735b (diff)
Make output when failing a test for diff in line numbers more verbose
Change-Id: I536ffddffe40f9f6bbcd75f312a5f902763e1131 Reviewed-by: Jason McDonald <macadder1@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index 7b578e28ea..15aec85bdf 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -637,9 +637,19 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
.arg(loggers.at(n))));
}
} else {
- QVERIFY2(res.count() == exp.count(),
+ if (res.count() != exp.count()) {
+ qDebug() << "<<<<<<";
+ foreach (const QByteArray &line, res)
+ qDebug() << line;
+ qDebug() << "======";
+ foreach (const QByteArray &line, exp)
+ qDebug() << line;
+ qDebug() << ">>>>>>";
+
+ QVERIFY2(res.count() == exp.count(),
qPrintable(QString::fromLatin1("Mismatch in line count: %1 != %2 (%3).")
.arg(res.count()).arg(exp.count()).arg(loggers.at(n))));
+ }
}
// By this point, we should have loaded a non-empty expected data file.