diff options
Diffstat (limited to 'tests/auto/quick/qquickflickable/tst_qquickflickable.cpp')
-rw-r--r-- | tests/auto/quick/qquickflickable/tst_qquickflickable.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp index 5364530ca8..f3659290eb 100644 --- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp +++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp @@ -205,6 +205,7 @@ private slots: void overshoot_reentrant(); void synchronousDrag_data(); void synchronousDrag(); + void visibleAreaBinding(); private: void flickWithTouch(QQuickWindow *window, const QPoint &from, const QPoint &to); @@ -2540,6 +2541,16 @@ void tst_qquickflickable::synchronousDrag() QTest::touchEvent(window, touchDevice).release(0, p5, window); } +// QTBUG-81098: tests that a binding to visibleArea doesn't result +// in a division-by-zero exception (when exceptions are enabled). +void tst_qquickflickable::visibleAreaBinding() +{ + QScopedPointer<QQuickView> window(new QQuickView); + window->setSource(testFileUrl("visibleAreaBinding.qml")); + QTRY_COMPARE(window->status(), QQuickView::Ready); + // Shouldn't crash. +} + QTEST_MAIN(tst_qquickflickable) #include "tst_qquickflickable.moc" |