From d56d0baefd53a8c7f3a9cd10fcaaeef1826e7d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 25 Oct 2016 20:56:40 +0200 Subject: converter: return a variant when the schema is a variant --- tests/client/convertertest.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/client/convertertest.cpp b/tests/client/convertertest.cpp index f1fd48e..5492a02 100644 --- a/tests/client/convertertest.cpp +++ b/tests/client/convertertest.cpp @@ -192,6 +192,11 @@ private Q_SLOTS: QTest::newRow("int64") << QVariant::fromValue(1) << "x"; QTest::newRow("uint64") << QVariant::fromValue(1) << "t"; + // convert to variant + QTest::newRow("variant from int") << QVariant::fromValue(1) << "v"; + QTest::newRow("variant from double") << QVariant::fromValue(1.1) << "v"; + QTest::newRow("variant from string") << QVariant::fromValue("string") << "v"; + // convert to bool QTest::newRow("bool") << QVariant::fromValue(true) << "b"; QTest::newRow("bool from int") << QVariant::fromValue(1) << "b"; -- cgit v1.2.3