summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-09 06:23:42 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-09 06:23:42 (GMT)
commitc6101765924d2cc8290f342a945106405bc42129 (patch)
tree82530a1c1bc8514fca14c08a1ab8ab62c8843689 /tests/auto/declarative
parentdabc2b4f015ab37d4c7ace4a96b5615722a1efc1 (diff)
downloadQt-c6101765924d2cc8290f342a945106405bc42129.zip
Qt-c6101765924d2cc8290f342a945106405bc42129.tar.gz
Qt-c6101765924d2cc8290f342a945106405bc42129.tar.bz2
Fix and test set/get of structured ListModel data.
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/qmllistmodel/tst_qmllistmodel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/declarative/qmllistmodel/tst_qmllistmodel.cpp b/tests/auto/declarative/qmllistmodel/tst_qmllistmodel.cpp
index 9ce1a7c..3222d42 100644
--- a/tests/auto/declarative/qmllistmodel/tst_qmllistmodel.cpp
+++ b/tests/auto/declarative/qmllistmodel/tst_qmllistmodel.cpp
@@ -110,7 +110,9 @@ void tst_QmlListModel::dynamic_data()
// Structured model
- // XXX todo
+ QTest::newRow("listprop1a") << "{append({'foo':123,'bars':[{'a':1},{'a':2},{'a':3}]});count}" << 1 << "";
+ QTest::newRow("listprop1b") << "{append({'foo':123,'bars':[{'a':1},{'a':2},{'a':3}]});get(0).bars.get(1).a}" << 2 << "";
+ QTest::newRow("listprop2a") << "{append({'foo':123,'bars':[{'a':1},{'a':2},{'a':3}]});get(0).bars.append({'a':4});get(0).bars.get(3).a}" << 4 << "";
}
void tst_QmlListModel::dynamic()