aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Burchell <robin+qt@viroteck.net>2013-12-07 14:31:13 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-11 00:06:46 +0100
commitd384aa771d9146ac28ab01abdf3696723e2ff67b (patch)
tree5744dd3e7e4a94dded2b5a975ad79b700f9dbade
parente2706405864e6be4a7f6b6ed372b680a61f6adad (diff)
Stabilise and remove insignificant marker from tst_qquickflickable.
A lot of work has gone into this test already since a79839dc5287de1448d1fd858db312a7bfa7b581, such as 6ba7d88df623df5bce85bfdae853fc49006e76f2. Everything passes for me locally, so let's skip specific tests if they break (or better: fix them) instead of having no test coverage at all. Change-Id: I29a7aeb26b106955c442da26df486cb6ce4bc92a Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
-rw-r--r--tests/auto/quick/qquickflickable/qquickflickable.pro1
-rw-r--r--tests/auto/quick/qquickflickable/tst_qquickflickable.cpp15
2 files changed, 5 insertions, 11 deletions
diff --git a/tests/auto/quick/qquickflickable/qquickflickable.pro b/tests/auto/quick/qquickflickable/qquickflickable.pro
index dfc8d7541b..88dc2fbc2a 100644
--- a/tests/auto/quick/qquickflickable/qquickflickable.pro
+++ b/tests/auto/quick/qquickflickable/qquickflickable.pro
@@ -11,4 +11,3 @@ TESTDATA = data/*
QT += core-private gui-private qml-private quick-private testlib
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-CONFIG+=insignificant_test
diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
index 268cdf7920..7a31be6980 100644
--- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
+++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
@@ -427,8 +427,7 @@ void tst_qquickflickable::pressDelay()
// As we moved pass the drag threshold, we should never receive the press
QVERIFY(mouseArea->property("pressed").toBool() == false);
- QTest::qWait(200);
- QVERIFY(mouseArea->property("pressed").toBool() == false);
+ QTRY_VERIFY(mouseArea->property("pressed").toBool() == false);
// On release the clicked signal should *not* be emitted
QTest::mouseRelease(window.data(), Qt::LeftButton, 0, QPoint(150, 190));
@@ -1182,8 +1181,7 @@ void tst_qquickflickable::margins()
// position to the far right, including margin
obj->setContentX(1600 + 50 - obj->width());
obj->returnToBounds();
- QTest::qWait(200);
- QCOMPARE(obj->contentX(), 1600. + 50. - obj->width());
+ QTRY_COMPARE(obj->contentX(), 1600. + 50. - obj->width());
// position beyond the far right, including margin
obj->setContentX(1600 + 50 - obj->width() + 1.);
@@ -1198,8 +1196,7 @@ void tst_qquickflickable::margins()
// position to the far bottom, including margin
obj->setContentY(600 + 30 - obj->height());
obj->returnToBounds();
- QTest::qWait(200);
- QCOMPARE(obj->contentY(), 600. + 30. - obj->height());
+ QTRY_COMPARE(obj->contentY(), 600. + 30. - obj->height());
// position beyond the far bottom, including margin
obj->setContentY(600 + 30 - obj->height() + 1.);
@@ -1268,14 +1265,12 @@ void tst_qquickflickable::clickAndDragWhenTransformed()
// click outside child rect
QTest::mousePress(view.data(), Qt::LeftButton, 0, QPoint(190, 190));
- QTest::qWait(10);
- QCOMPARE(flickable->property("itemPressed").toBool(), false);
+ QTRY_COMPARE(flickable->property("itemPressed").toBool(), false);
QTest::mouseRelease(view.data(), Qt::LeftButton, 0, QPoint(190, 190));
// click inside child rect
QTest::mousePress(view.data(), Qt::LeftButton, 0, QPoint(200, 200));
- QTest::qWait(10);
- QCOMPARE(flickable->property("itemPressed").toBool(), true);
+ QTRY_COMPARE(flickable->property("itemPressed").toBool(), true);
QTest::mouseRelease(view.data(), Qt::LeftButton, 0, QPoint(200, 200));
const int threshold = qApp->styleHints()->startDragDistance();