From f046f19df2e649a076e75f9a0847ee669cf2f903 Mon Sep 17 00:00:00 2001 From: Viktor Engelmann Date: Thu, 18 May 2017 14:53:02 +0200 Subject: Make error message more verbose in tst_QWebEnginePage::progressSignal If the Q_VERIFY(current >= previousValue) fails, the output was not verbose enough. The additional outputs will tell us more about what caused the test to fail. Task-number: QTBUG-57839 Change-Id: Ieeefe68ede111be7dba5eda9f2a770e975efc0ee Reviewed-by: Kai Koehne --- tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index b03418aea..bef77d3f1 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -3025,7 +3025,13 @@ void tst_QWebEnginePage::progressSignal() int previousValue = -1; for (QSignalSpy::ConstIterator it = progressSpy.begin(); it < progressSpy.end(); ++it) { int current = (*it).first().toInt(); - QVERIFY(current >= previousValue); + // verbose output for faulty condition + if (!(current >= previousValue)) { + qDebug() << "faulty progress values:"; + for (QSignalSpy::ConstIterator it2 = progressSpy.begin(); it2 < progressSpy.end(); ++it2) + qDebug() << (*it2).first().toInt(); + QVERIFY(current >= previousValue); + } previousValue = current; } -- cgit v1.2.3