summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-07-14 02:32:21 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-07-14 02:32:21 (GMT)
commit32c2412d55d2387e8b05892fe1b1d2d54b624d02 (patch)
tree07156d15d54125620799e2866cc259c564ac79ea /tests
parenta675b9ef9f85fa4a2fa245cd164d1e330b703bd9 (diff)
parent07ebc9161263c04dc072b9fc2a922b9665cbe7be (diff)
downloadQt-32c2412d55d2387e8b05892fe1b1d2d54b624d02.zip
Qt-32c2412d55d2387e8b05892fe1b1d2d54b624d02.tar.gz
Qt-32c2412d55d2387e8b05892fe1b1d2d54b624d02.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
index f15ac8f..858c26d 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
@@ -193,8 +193,9 @@ void tst_qdeclarativelistmodel::dynamic_data()
QTest::newRow("count") << "count" << 0 << "";
- QTest::newRow("get1") << "{get(0)}" << 0 << "";
- QTest::newRow("get2") << "{get(-1)}" << 0 << "";
+ QTest::newRow("get1") << "{get(0) === undefined}" << 1 << "";
+ QTest::newRow("get2") << "{get(-1) === undefined}" << 1 << "";
+ QTest::newRow("get3") << "{append({'foo':123});get(0) != undefined}" << 1 << "";
QTest::newRow("append1") << "{append({'foo':123});count}" << 1 << "";
QTest::newRow("append2") << "{append({'foo':123,'bar':456});count}" << 1 << "";
@@ -292,8 +293,6 @@ void tst_qdeclarativelistmodel::dynamic()
if (e.hasError())
qDebug() << e.error(); // errors not expected
- if (QTest::currentDataTag() != QLatin1String("clear3") && QTest::currentDataTag() != QLatin1String("remove3"))
- QVERIFY(!e.hasError());
QCOMPARE(actual,result);
}
@@ -308,6 +307,9 @@ void tst_qdeclarativelistmodel::dynamic_worker()
QFETCH(int, result);
QFETCH(QString, warning);
+ // This is same as dynamic() except it applies the test to a ListModel called
+ // from a WorkerScript (i.e. testing the internal NestedListModel class)
+
QDeclarativeListModel model;
QDeclarativeEngine eng;
QDeclarativeComponent component(&eng, QUrl::fromLocalFile(SRCDIR "/data/model.qml"));