diff options
author | Robin Burchell <robin+qt@viroteck.net> | 2013-12-07 14:31:13 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-11 00:06:46 +0100 |
commit | d384aa771d9146ac28ab01abdf3696723e2ff67b (patch) | |
tree | 5744dd3e7e4a94dded2b5a975ad79b700f9dbade /tests/auto/quick/qquickflickable/tst_qquickflickable.cpp | |
parent | e2706405864e6be4a7f6b6ed372b680a61f6adad (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>
Diffstat (limited to 'tests/auto/quick/qquickflickable/tst_qquickflickable.cpp')
-rw-r--r-- | tests/auto/quick/qquickflickable/tst_qquickflickable.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
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(); |