diff options
Diffstat (limited to 'tests/auto/quick/qquickflipable/tst_qquickflipable.cpp')
-rw-r--r-- | tests/auto/quick/qquickflipable/tst_qquickflipable.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickflipable/tst_qquickflipable.cpp b/tests/auto/quick/qquickflipable/tst_qquickflipable.cpp index 4fe155168a..8c1c248925 100644 --- a/tests/auto/quick/qquickflipable/tst_qquickflipable.cpp +++ b/tests/auto/quick/qquickflipable/tst_qquickflipable.cpp @@ -58,6 +58,7 @@ private slots: void create(); void checkFrontAndBack(); void setFrontAndBack(); + void flipFlipable(); // below here task issues void QTBUG_9161_crash(); @@ -109,6 +110,20 @@ void tst_qquickflipable::setFrontAndBack() delete obj; } +void tst_qquickflipable::flipFlipable() +{ + QQmlEngine engine; + QQmlComponent c(&engine, testFileUrl("flip-flipable.qml")); + QQuickFlipable *obj = qobject_cast<QQuickFlipable*>(c.create()); + QVERIFY(obj != 0); + QVERIFY(obj->side() == QQuickFlipable::Front); + obj->setProperty("flipped", QVariant(true)); + QTRY_VERIFY(obj->side() == QQuickFlipable::Back); + QTRY_VERIFY(obj->side() == QQuickFlipable::Front); + QTRY_VERIFY(obj->side() == QQuickFlipable::Back); + delete obj; +} + void tst_qquickflipable::QTBUG_9161_crash() { QQuickView *canvas = new QQuickView; |