aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2022-07-26 12:02:28 +0800
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-07-26 14:10:27 +0000
commitdda68f7cc95d5e6c5804e8c2091c2e0a1934d314 (patch)
tree444506983013af814c48089723569b8c60964000
parentd3ccd144ef19c2d2438bf144c05d080382a44cf4 (diff)
tst_QQuickListView2::flickDuringFlicking: improve failure message
Use QTRY_VERIFY2 to show the actual contentY upon failure. Task-number: QTBUG-105190 Change-Id: I387d92cbc33e2aab67f72219f3354adbd537c334 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 8706661b3d959eb7a59648b4e6e8e64ac4aea2a3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/quick/qquicklistview2/tst_qquicklistview2.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/quick/qquicklistview2/tst_qquicklistview2.cpp b/tests/auto/quick/qquicklistview2/tst_qquicklistview2.cpp
index 0cb88c501d..1905c0f660 100644
--- a/tests/auto/quick/qquicklistview2/tst_qquicklistview2.cpp
+++ b/tests/auto/quick/qquicklistview2/tst_qquicklistview2.cpp
@@ -417,7 +417,9 @@ void tst_QQuickListView2::flickDuringFlicking() // QTBUG-103832
listView->setBoundsBehavior(boundsBehavior);
flickWithTouch(&window, {100, 400}, {100, 100});
- QTRY_VERIFY(listView->contentY() > 1000); // let it flick some distance
+ // let it flick some distance
+ QTRY_VERIFY2(listView->contentY() > 1000, qPrintable(QString::fromLatin1(
+ "Expected ListView's contentY to be greater than 1000, but it's %1").arg(listView->contentY())));
QVERIFY(listView->isFlicking()); // we want to test the case when it's moving and then we flick again
const qreal posBeforeSecondFlick = listView->contentY();