diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-08-26 06:47:22 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-08-26 06:47:22 (GMT) |
commit | 48d057b8f4ae70d9ea43d4a234ff63956a70c3b6 (patch) | |
tree | f10b4a80aabc843637d43360146432752fe575f3 /tests | |
parent | 55991e39819007b5c6d0662808d522cf32c383a4 (diff) | |
download | Qt-48d057b8f4ae70d9ea43d4a234ff63956a70c3b6.zip Qt-48d057b8f4ae70d9ea43d4a234ff63956a70c3b6.tar.gz Qt-48d057b8f4ae70d9ea43d4a234ff63956a70c3b6.tar.bz2 |
Fix ListView and GridView tests following off-by-one fixes.
Our tests were verifying incorrect positions...
Task-number: QTBUG-12822
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index 1a28b71..896d69e 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -590,7 +590,7 @@ void tst_QDeclarativeGridView::currentIndex() QCOMPARE(gridview->currentIndex(), 35); QCOMPARE(gridview->currentItem(), findItem<QDeclarativeItem>(contentItem, "wrapper", 35)); QCOMPARE(gridview->currentItem()->y(), gridview->highlightItem()->y()); - QCOMPARE(gridview->contentY(), 399.0); + QCOMPARE(gridview->contentY(), 400.0); gridview->moveCurrentIndexRight(); QCOMPARE(gridview->currentIndex(), 36); @@ -629,7 +629,7 @@ void tst_QDeclarativeGridView::currentIndex() gridview->moveCurrentIndexLeft(); QCOMPARE(gridview->currentIndex(), model.count()-1); - QTRY_COMPARE(gridview->contentY(), 879.0); + QTRY_COMPARE(gridview->contentY(), 880.0); gridview->moveCurrentIndexRight(); QCOMPARE(gridview->currentIndex(), 0); diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index 491ac0f..e7c61db 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -979,7 +979,7 @@ void tst_QDeclarativeListView::currentIndex() // current item should be 20th item at startup // and current item should be in view QCOMPARE(listview->currentIndex(), 20); - QCOMPARE(listview->contentY(), 99.0); + QCOMPARE(listview->contentY(), 100.0); QCOMPARE(listview->currentItem(), findItem<QDeclarativeItem>(contentItem, "wrapper", 20)); QCOMPARE(listview->highlightItem()->y(), listview->currentItem()->y()); |