diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-09-13 01:02:24 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-09-13 01:02:24 (GMT) |
commit | 491f5f9cc6da171155c613295018b9d54bb683c9 (patch) | |
tree | 631f1ad299783db0e070a86694ce2bb2c423f846 | |
parent | 08db697bcc1d530d92d6b28aad1629846692db74 (diff) | |
download | Qt-491f5f9cc6da171155c613295018b9d54bb683c9.zip Qt-491f5f9cc6da171155c613295018b9d54bb683c9.tar.gz Qt-491f5f9cc6da171155c613295018b9d54bb683c9.tar.bz2 |
Add test for view velocity update on setCurrentIndex()
Task-number: QTBUG-13543
-rw-r--r-- | tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp | 2 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index d4d8bf6..5fd373c 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -604,6 +604,8 @@ void tst_QDeclarativeGridView::currentIndex() // no wrap gridview->setCurrentIndex(0); QCOMPARE(gridview->currentIndex(), 0); + // confirm that the velocity is updated + QTRY_VERIFY(gridview->verticalVelocity() != 0.0); gridview->moveCurrentIndexUp(); QCOMPARE(gridview->currentIndex(), 0); diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index e4b59a7..cd17fad 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -1016,6 +1016,8 @@ void tst_QDeclarativeListView::currentIndex() // no wrap listview->setCurrentIndex(0); QCOMPARE(listview->currentIndex(), 0); + // confirm that the velocity is updated + QTRY_VERIFY(listview->verticalVelocity() != 0.0); listview->incrementCurrentIndex(); QCOMPARE(listview->currentIndex(), 1); |