aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-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;