diff options
author | Martin Smith <martin.smith@nokia.com> | 2010-08-11 09:30:07 (GMT) |
---|---|---|
committer | Martin Smith <martin.smith@nokia.com> | 2010-08-11 09:30:07 (GMT) |
commit | 41a982bec324894e8a71d68a44f99b0a0d220a34 (patch) | |
tree | be22c6993f1c8e4d5ac9f3bd9a0c5847548a9856 /tests/auto | |
parent | 62968f33452016b31020e524fa6ba6d2cefd0278 (diff) | |
parent | a00dda686367807d6cc90f3cfca5453200565501 (diff) | |
download | Qt-41a982bec324894e8a71d68a44f99b0a0d220a34.zip Qt-41a982bec324894e8a71d68a44f99b0a0d220a34.tar.gz Qt-41a982bec324894e8a71d68a44f99b0a0d220a34.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp | 7 |
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); } |