aboutsummaryrefslogtreecommitdiff
path: root/tests/client
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2016-10-25 20:55:34 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2016-10-25 20:55:34 +0200
commiteb6e5b591ec3972dad11656fff6bfa0597483c4c (patch)
treeb773c83bbf2d931c464252d346dc703577a2dbe5 /tests/client
parentfc52f8461996abd0b4f66d59360e870581f19d97 (diff)
downloadqmenumodel-eb6e5b591ec3972dad11656fff6bfa0597483c4c.tar.gz
qmenumodel-eb6e5b591ec3972dad11656fff6bfa0597483c4c.tar.bz2
qmenumodel-eb6e5b591ec3972dad11656fff6bfa0597483c4c.zip
converter: verify integer type conversions
Diffstat (limited to 'tests/client')
-rw-r--r--tests/client/convertertest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/client/convertertest.cpp b/tests/client/convertertest.cpp
index 9e13ccb..f1fd48e 100644
--- a/tests/client/convertertest.cpp
+++ b/tests/client/convertertest.cpp
@@ -180,9 +180,17 @@ private Q_SLOTS:
QTest::addColumn<QVariant>("value");
QTest::addColumn<QString>("schema");
+ // convert to byte
+ QTest::newRow("byte") << QVariant::fromValue<int>(1) << "y";
+
// convert to integer
QTest::newRow("integer") << QVariant::fromValue<int>(1) << "i";
QTest::newRow("integer from double") << QVariant::fromValue<double>(1.1) << "i";
+ QTest::newRow("int16") << QVariant::fromValue<int>(-1) << "n";
+ QTest::newRow("uint16") << QVariant::fromValue<int>(1) << "q";
+ QTest::newRow("uint32") << QVariant::fromValue<int>(1) << "u";
+ QTest::newRow("int64") << QVariant::fromValue<int>(1) << "x";
+ QTest::newRow("uint64") << QVariant::fromValue<int>(1) << "t";
// convert to bool
QTest::newRow("bool") << QVariant::fromValue<bool>(true) << "b";