diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-01-19 02:42:03 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-01-19 02:42:03 (GMT) |
commit | bc6940f53891856a3a6c3d8f1c25a8eaada90b33 (patch) | |
tree | bb47f4629997aaacf6dab41ff8183f5166ee9561 /tests | |
parent | 123420ab170376cbd4e2e2c7676f383daa36bb95 (diff) | |
download | Qt-bc6940f53891856a3a6c3d8f1c25a8eaada90b33.zip Qt-bc6940f53891856a3a6c3d8f1c25a8eaada90b33.tar.gz Qt-bc6940f53891856a3a6c3d8f1c25a8eaada90b33.tar.bz2 |
Fix to correctly return property values that are javascript arrays.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qmllistmodel/tst_qmllistmodel.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmllistmodel/tst_qmllistmodel.cpp b/tests/auto/declarative/qmllistmodel/tst_qmllistmodel.cpp index 0986d20..b43b699 100644 --- a/tests/auto/declarative/qmllistmodel/tst_qmllistmodel.cpp +++ b/tests/auto/declarative/qmllistmodel/tst_qmllistmodel.cpp @@ -150,7 +150,12 @@ void tst_QmlListModel::dynamic_data() 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("listprop1c") << "{append({'foo':123,'bars':[{'a':1},{'a':2},{'a':3}]});get(0).bars.count}" << 3 << ""; 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 << ""; + + QTest::newRow("list-0-items") << "{append({'foo':[]});get(0).foo.count}" << 0 << ""; + QTest::newRow("list-1-item") << "{append({'foo':[1]});get(0).foo.count}" << 1 << ""; + QTest::newRow("list-multi-items") << "{append({'foo':[1,2,3]});get(0).foo.count}" << 3 << ""; } void tst_QmlListModel::dynamic() |