summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-11-05 04:47:57 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-11-05 04:47:57 (GMT)
commitf6caaf073408da5c85329fb4849e23f97621ea85 (patch)
tree8a460398e00eda896d4eabc34c40bb1e65f4ce95 /tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp
parent0ef5d89b540be963d1a8131f6625f990a4fe66e8 (diff)
parentd39ec85b7e5d8702c2888cdad4ccdae72531c199 (diff)
downloadQt-f6caaf073408da5c85329fb4849e23f97621ea85.zip
Qt-f6caaf073408da5c85329fb4849e23f97621ea85.tar.gz
Qt-f6caaf073408da5c85329fb4849e23f97621ea85.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp')
-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()