aboutsummaryrefslogtreecommitdiff
path: root/tests/client/modeltest.cpp
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2012-10-17 15:10:49 +0000
committerTarmac <>2012-10-17 15:10:49 +0000
commitd46ee24446b49d8ef00f9f0aef44ee863966f245 (patch)
tree6c13049fc74b0c44d2bbe28dfd1dc212dad1970c /tests/client/modeltest.cpp
parentced307a448aeed3a20d1a1e4bdcbf4dcbe4b1e46 (diff)
parentcdd910c7a326af6d87acc6df1c90016c8e30cbc7 (diff)
downloadqmenumodel-d46ee24446b49d8ef00f9f0aef44ee863966f245.tar.gz
qmenumodel-d46ee24446b49d8ef00f9f0aef44ee863966f245.tar.bz2
qmenumodel-d46ee24446b49d8ef00f9f0aef44ee863966f245.zip
Implemented conversion for QVariantMap;
Created unit test for QVariantMap conversion;. Approved by Olivier Tilloy, PS Jenkins bot.
Diffstat (limited to 'tests/client/modeltest.cpp')
-rw-r--r--tests/client/modeltest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/client/modeltest.cpp b/tests/client/modeltest.cpp
index 03629ca..1c2eeca 100644
--- a/tests/client/modeltest.cpp
+++ b/tests/client/modeltest.cpp
@@ -202,6 +202,16 @@ private Q_SLOTS:
v = extra["string"];
QCOMPARE(v.type(), QVariant::String);
QCOMPARE(v.toString(), QString("42"));
+
+ // Map
+ v = extra["map"];
+ QVariantMap map;
+ map.insert("int64", QVariant::fromValue<long>(-42));
+ map.insert("string", "42");
+ map.insert("double", 42.42);
+
+ QCOMPARE(v.type(), QVariant::Map);
+ QCOMPARE(v.toMap(), map);
}
/*