From eb6e5b591ec3972dad11656fff6bfa0597483c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 25 Oct 2016 20:55:34 +0200 Subject: converter: verify integer type conversions --- tests/client/convertertest.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') 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("value"); QTest::addColumn("schema"); + // convert to byte + QTest::newRow("byte") << QVariant::fromValue(1) << "y"; + // convert to integer QTest::newRow("integer") << QVariant::fromValue(1) << "i"; QTest::newRow("integer from double") << QVariant::fromValue(1.1) << "i"; + QTest::newRow("int16") << QVariant::fromValue(-1) << "n"; + QTest::newRow("uint16") << QVariant::fromValue(1) << "q"; + QTest::newRow("uint32") << QVariant::fromValue(1) << "u"; + QTest::newRow("int64") << QVariant::fromValue(1) << "x"; + QTest::newRow("uint64") << QVariant::fromValue(1) << "t"; // convert to bool QTest::newRow("bool") << QVariant::fromValue(true) << "b"; -- cgit v1.2.3