summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativelistview
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-09-13 01:02:24 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-09-13 01:02:24 (GMT)
commit491f5f9cc6da171155c613295018b9d54bb683c9 (patch)
tree631f1ad299783db0e070a86694ce2bb2c423f846 /tests/auto/declarative/qdeclarativelistview
parent08db697bcc1d530d92d6b28aad1629846692db74 (diff)
downloadQt-491f5f9cc6da171155c613295018b9d54bb683c9.zip
Qt-491f5f9cc6da171155c613295018b9d54bb683c9.tar.gz
Qt-491f5f9cc6da171155c613295018b9d54bb683c9.tar.bz2
Add test for view velocity update on setCurrentIndex()
Task-number: QTBUG-13543
Diffstat (limited to 'tests/auto/declarative/qdeclarativelistview')
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp2
1 files changed, 2 insertions, 0 deletions
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);