summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-07-14 05:33:35 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-07-14 05:33:35 (GMT)
commit86015c316c17f20667e786148d83d673886ad945 (patch)
treecfa3fdd5eec2aaf4d42df3a5844e42b0e663ab08 /tests/auto
parent9adc85fdfa0af2b6948408932188ee1b79247fa6 (diff)
parent32c2412d55d2387e8b05892fe1b1d2d54b624d02 (diff)
downloadQt-86015c316c17f20667e786148d83d673886ad945.zip
Qt-86015c316c17f20667e786148d83d673886ad945.tar.gz
Qt-86015c316c17f20667e786148d83d673886ad945.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'tests/auto')
-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"));