diff options
author | Renato Araujo Oliveira Filho <renato.filho@canonical.com> | 2012-10-17 15:10:49 +0000 |
---|---|---|
committer | Tarmac <> | 2012-10-17 15:10:49 +0000 |
commit | d46ee24446b49d8ef00f9f0aef44ee863966f245 (patch) | |
tree | 6c13049fc74b0c44d2bbe28dfd1dc212dad1970c /tests/client/modeltest.cpp | |
parent | ced307a448aeed3a20d1a1e4bdcbf4dcbe4b1e46 (diff) | |
parent | cdd910c7a326af6d87acc6df1c90016c8e30cbc7 (diff) | |
download | qmenumodel-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.cpp | 10 |
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); } /* |