summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViktor Engelmann <viktor.engelmann@qt.io>2017-05-18 14:53:02 +0200
committerViktor Engelmann <viktor.engelmann@qt.io>2017-05-23 09:16:08 +0000
commitf046f19df2e649a076e75f9a0847ee669cf2f903 (patch)
tree0f59381244b2ffdaa5f6c5adb915fbb39b0d96e5
parentc8db91081485bb4ef2430f1c39cb66336cce9d62 (diff)
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 <kai.koehne@qt.io>
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp8
1 files changed, 7 insertions, 1 deletions
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;
}