From 54b7264b459d330c1b481f7f0bb000295ce15cf6 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 5 Nov 2009 11:13:48 +1000 Subject: QmlPropertyMap autotest update. --- tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp | 12 +++++++----- 1 file 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() -- cgit v0.12