summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-10-08 07:32:18 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-10-08 07:32:18 (GMT)
commit32e81daf19c5b4524302359a97dd3dc743edc912 (patch)
tree2139cdd5232d352480bc910d4a435927a0a4304d /tests/auto/declarative
parent5ca691eb57133cef3144967a70faa41147a8a37f (diff)
downloadQt-32e81daf19c5b4524302359a97dd3dc743edc912.zip
Qt-32e81daf19c5b4524302359a97dd3dc743edc912.tar.gz
Qt-32e81daf19c5b4524302359a97dd3dc743edc912.tar.bz2
Update
Repeater is now *after* items.
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/repeater/tst_repeater.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/declarative/repeater/tst_repeater.cpp b/tests/auto/declarative/repeater/tst_repeater.cpp
index 1bb746b..68007a6 100644
--- a/tests/auto/declarative/repeater/tst_repeater.cpp
+++ b/tests/auto/declarative/repeater/tst_repeater.cpp
@@ -53,14 +53,18 @@ void tst_QFxRepeater::stringList()
QCOMPARE(container->childItems().count(), data.count() + 3);
+ bool saw_repeater = false;
for (int i = 0; i < container->childItems().count(); ++i) {
if (i == 0) {
QFxText *name = qobject_cast<QFxText*>(container->childItems().at(i));
QVERIFY(name != 0);
QCOMPARE(name->text(), QLatin1String("Zero"));
- } else if (i == 1) {
+ } else if (i == container->childItems().count() - 2) {
// The repeater itself
+ QFxRepeater *rep = qobject_cast<QFxRepeater*>(container->childItems().at(i));
+ QCOMPARE(rep, repeater);
+ saw_repeater = true;
continue;
} else if (i == container->childItems().count() - 1) {
QFxText *name = qobject_cast<QFxText*>(container->childItems().at(i));
@@ -69,10 +73,10 @@ void tst_QFxRepeater::stringList()
} else {
QFxText *name = qobject_cast<QFxText*>(container->childItems().at(i));
QVERIFY(name != 0);
- QCOMPARE(name->text(), data.at(i-2));
+ QCOMPARE(name->text(), data.at(i-1));
}
-
}
+ QVERIFY(saw_repeater);
delete canvas;
}