aboutsummaryrefslogtreecommitdiff
path: root/tests/client
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2016-10-17 10:01:14 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2016-10-17 10:01:14 +0200
commitf52b49722542123844b5c46157dcbc515e319f01 (patch)
tree9cd9943046dd532f8410af460d817730fbff7d97 /tests/client
parent33b75336e5148b7dcf6113dcfe59d58ee38f9481 (diff)
downloadqmenumodel-f52b49722542123844b5c46157dcbc515e319f01.tar.gz
qmenumodel-f52b49722542123844b5c46157dcbc515e319f01.tar.bz2
qmenumodel-f52b49722542123844b5c46157dcbc515e319f01.zip
converterTest: split tests by type
Diffstat (limited to 'tests/client')
-rw-r--r--tests/client/convertertest.cpp37
1 files changed, 35 insertions, 2 deletions
diff --git a/tests/client/convertertest.cpp b/tests/client/convertertest.cpp
index db2807f..d3f1174 100644
--- a/tests/client/convertertest.cpp
+++ b/tests/client/convertertest.cpp
@@ -67,44 +67,77 @@ private Q_SLOTS:
/*
* Test converter QVariant to GVariant
*/
- void testToGVariant()
+
+ void testBooleanToGVariant()
{
// Boolean
QVERIFY(compare(QVariant(true), G_VARIANT_TYPE_BOOLEAN));
+ }
+ void testByteToGVariant()
+ {
// Byte
QVERIFY(compare(QVariant::fromValue<uchar>(42), G_VARIANT_TYPE_BYTE));
+ }
+ void testInt16ToGVariant()
+ {
// Int16
QVERIFY(compare(QVariant::fromValue<short>(-42), G_VARIANT_TYPE_INT16));
+ }
+ void testUInt16ToGVariant()
+ {
// UInt16
QVERIFY(compare(QVariant::fromValue<ushort>(-42), G_VARIANT_TYPE_UINT16));
+ }
+ void testInt32ToGVariant()
+ {
// Int32
QVERIFY(compare(QVariant(-42), G_VARIANT_TYPE_INT32));
+ }
+ void testUInt32ToGVariant()
+ {
// UInt32
QVERIFY(compare(QVariant((uint)42), G_VARIANT_TYPE_UINT32));
+ }
+ void testInt64ToGVariant()
+ {
// Int64
QVERIFY(compare(QVariant::fromValue<long>(-42), G_VARIANT_TYPE_INT64));
+ }
+ void testUInt64ToGVariant()
+ {
// UInt64
QVERIFY(compare(QVariant::fromValue<ulong>(42), G_VARIANT_TYPE_UINT64));
+ }
+ void testDoubleToGVariant()
+ {
// Double
QVERIFY(compare(QVariant((double)42.42), G_VARIANT_TYPE_DOUBLE));
+ }
+ void testStringToGVariant()
+ {
// String
QVERIFY(compare(QVariant(QString("42")), G_VARIANT_TYPE_STRING));
+ }
+ void testByteArrayToGVariant()
+ {
// ByteArray
QVERIFY(compare(QVariant(QByteArray("42")), G_VARIANT_TYPE_BYTESTRING));
+ }
+ void testMapToGVariant()
+ {
// Map
QVERIFY(compare(QVariantMap(), G_VARIANT_TYPE_VARDICT));
-
}
void testTupleConversion()