aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-03-15 13:11:35 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-03-15 12:36:19 +0000
commit9921180a44d9097b1b83c2fa7b3f36dbb555140c (patch)
treeffefda9a5983a22be7a47a7b58c49f8ec6b0880e /tests/auto
parent73231fe953145ac0df4e62f173e1a90076466012 (diff)
Try to fix tst_qquickrectangle::gradient_separate()
Use QTRY_VERIFY in order to allow for a delay in rendering the rectangle. Fixes: QTBUG-74468 Change-Id: I797b269358aaa35487144bb03a85f36646e2302f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp b/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp
index f6ca999cf5..b34612ee88 100644
--- a/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp
+++ b/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp
@@ -134,14 +134,12 @@ void tst_qquickrectangle::gradient_separate()
// Start off clean
QQuickItemPrivate *rectPriv = QQuickItemPrivate::get(rect);
- bool isDirty = rectPriv->dirtyAttributes & QQuickItemPrivate::Content;
- QVERIFY(!isDirty);
+ QTRY_COMPARE(rectPriv->dirtyAttributes & QQuickItemPrivate::Content, 0);
QMetaObject::invokeMethod(rect, "changeGradient");
// Changing the gradient should have scheduled an update of the item.
- isDirty = rectPriv->dirtyAttributes & QQuickItemPrivate::Content;
- QVERIFY(isDirty);
+ QVERIFY((rectPriv->dirtyAttributes & QQuickItemPrivate::Content) != 0);
}
// When a gradient is changed, every Rectangle connected to it must update.