aboutsummaryrefslogtreecommitdiff
path: root/tests/client
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2016-10-18 15:39:20 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2016-10-18 15:39:20 +0200
commitc42bc210a32f06b2850fbe010be9356d477330b0 (patch)
treec6b02b386ab026be9ec6bfa488c3c13d8e383e68 /tests/client
parente87701e0f2d5f3b7dd291c7b8c62e407b5abf4c7 (diff)
downloadqmenumodel-c42bc210a32f06b2850fbe010be9356d477330b0.tar.gz
qmenumodel-c42bc210a32f06b2850fbe010be9356d477330b0.tar.bz2
qmenumodel-c42bc210a32f06b2850fbe010be9356d477330b0.zip
Converter: add support for ByteArrayList
Diffstat (limited to 'tests/client')
-rw-r--r--tests/client/convertertest.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/client/convertertest.cpp b/tests/client/convertertest.cpp
index e61caa0..933ed2f 100644
--- a/tests/client/convertertest.cpp
+++ b/tests/client/convertertest.cpp
@@ -163,6 +163,14 @@ private Q_SLOTS:
QVERIFY(compare(QVariant(QByteArray("42")), G_VARIANT_TYPE_BYTESTRING));
}
+ void testByteArrayListToGVariant()
+ {
+ // ByteArrayList
+ QVariant result;
+ result.setValue(QByteArrayList({"42", "53"}));
+ QVERIFY(compare(result, G_VARIANT_TYPE_BYTESTRING_ARRAY));
+ }
+
void testMapToGVariant()
{
// Map
@@ -235,6 +243,13 @@ private Q_SLOTS:
QVERIFY(compare(g_variant_new_bytestring("53"), QVariant::ByteArray));
}
+ void testByteArrayListToQVariant()
+ {
+ // ByteArrayList
+ const gchar * byteArray[] = {"42", "53", NULL};
+ QVERIFY(compare(g_variant_new_bytestring_array(byteArray, -1), QMetaType::QByteArrayList));
+ }
+
void testTupleConversion()
{
QVariantList qTuple;