summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-11-05 01:13:48 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-11-05 01:13:48 (GMT)
commit54b7264b459d330c1b481f7f0bb000295ce15cf6 (patch)
treee9e3bef41f268c257f721c59f1c7484c23c6d847 /tests/auto/declarative
parent9e5c80bd52467afa481775fe9695bac7edcf7324 (diff)
downloadQt-54b7264b459d330c1b481f7f0bb000295ce15cf6.zip
Qt-54b7264b459d330c1b481f7f0bb000295ce15cf6.tar.gz
Qt-54b7264b459d330c1b481f7f0bb000295ce15cf6.tar.bz2
QmlPropertyMap autotest update.
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp b/tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp
index 9be77e8..ece6030 100644
--- a/tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp
+++ b/tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp
@@ -95,13 +95,15 @@ void tst_QmlPropertyMap::operatorValue()
QmlPropertyMap map;
map.insert(QLatin1String("key1"),100);
map.insert(QLatin1String("key2"),200);
- QVERIFY(map.keys().count() == 2);
+ QVERIFY(map.count() == 2);
QVERIFY(map.contains(QLatin1String("key1")));
- QCOMPARE(map.value(QLatin1String("key1")), QVariant(100));
- QCOMPARE(map.value(QLatin1String("key2")), QVariant(200));
- QCOMPARE(map[QLatin1String("key1")], map.value(QLatin1String("key1")));
- QCOMPARE(map[QLatin1String("key2")], map.value(QLatin1String("key2")));
+ const QmlPropertyMap &constMap = map;
+
+ QCOMPARE(constMap.value(QLatin1String("key1")), QVariant(100));
+ QCOMPARE(constMap.value(QLatin1String("key2")), QVariant(200));
+ QCOMPARE(constMap[QLatin1String("key1")], constMap.value(QLatin1String("key1")));
+ QCOMPARE(constMap[QLatin1String("key2")], constMap.value(QLatin1String("key2")));
}
void tst_QmlPropertyMap::clear()