summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2010-08-11 12:48:06 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2010-08-11 12:48:06 (GMT)
commitaf7d477b4c02cb4576ffae2e510cd53afaa2fba4 (patch)
tree36cc5046148d366b0dded2613ba40ff782ee636c /tests
parent4d616151fa6b65804c466cd50335c99de41a163c (diff)
parent0cafff970c52f982d5acec368b5b5fdab319688d (diff)
downloadQt-af7d477b4c02cb4576ffae2e510cd53afaa2fba4.zip
Qt-af7d477b4c02cb4576ffae2e510cd53afaa2fba4.tar.gz
Qt-af7d477b4c02cb4576ffae2e510cd53afaa2fba4.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
index 858c26d..10805b4 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
@@ -271,6 +271,9 @@ void tst_qdeclarativelistmodel::dynamic_data()
QTest::newRow("nested-insert") << "{append({'foo':123});insert(0,{'bars':[{'a':1},{'b':2},{'c':3}]});get(0).bars.get(0).a}" << 1 << "";
QTest::newRow("nested-set") << "{append({'foo':123});set(0,{'foo':[{'x':123}]});get(0).foo.get(0).x}" << 123 << "";
+ QTest::newRow("nested-count") << "{append({'foo':123,'bars':[{'a':1},{'a':2},{'a':3}]}); get(0).bars.count}" << 3 << "";
+ QTest::newRow("nested-clear") << "{append({'foo':123,'bars':[{'a':1},{'a':2},{'a':3}]}); get(0).bars.clear(); get(0).bars.count}" << 0 << "";
+
// XXX
//QTest::newRow("nested-setprop") << "{append({'foo':123});setProperty(0,'foo',[{'x':123}]);get(0).foo.get(0).x}" << 123 << "";
}
@@ -344,9 +347,7 @@ void tst_qdeclarativelistmodel::dynamic_worker()
waitForWorker(item);
QDeclarativeExpression e(eng.rootContext(), &model, operations.last().toString());
- if (QByteArray(QTest::currentDataTag()).startsWith("nested"))
- QVERIFY(e.evaluate().toInt() != result);
- else
+ if (!QByteArray(QTest::currentDataTag()).startsWith("nested"))
QCOMPARE(e.evaluate().toInt(), result);
}