From 32e81daf19c5b4524302359a97dd3dc743edc912 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 8 Oct 2009 17:32:18 +1000 Subject: Update Repeater is now *after* items. --- tests/auto/declarative/repeater/tst_repeater.cpp | 10 +++++++--- 1 file 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(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(container->childItems().at(i)); + QCOMPARE(rep, repeater); + saw_repeater = true; continue; } else if (i == container->childItems().count() - 1) { QFxText *name = qobject_cast(container->childItems().at(i)); @@ -69,10 +73,10 @@ void tst_QFxRepeater::stringList() } else { QFxText *name = qobject_cast(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; } -- cgit v0.12