summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2019-05-28 11:22:40 +0200
committerLiang Qi <liang.qi@qt.io>2019-05-28 11:22:40 +0200
commit7abcc491fac43a17ff6c9e1de0c7646961690849 (patch)
treeb9b0b5a69d4dcf5232f36ddc3a8f1f5f3e7dd204 /tests
parent6031bd7bfdf97c492f9f11b4bd0a5375613b55de (diff)
parentcbb8fc1ae374e2b25c733e3f15109fb407e0cf95 (diff)
downloadqtwebchannel-7abcc491fac43a17ff6c9e1de0c7646961690849.tar.gz
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: src/webchannel/qmetaobjectpublisher.cpp Change-Id: I853b8fc7270847c1a9cdd862dff278ddb2533e92
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/webchannel/tst_webchannel.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/webchannel/tst_webchannel.cpp b/tests/auto/webchannel/tst_webchannel.cpp
index 4e622c7..ffaebba 100644
--- a/tests/auto/webchannel/tst_webchannel.cpp
+++ b/tests/auto/webchannel/tst_webchannel.cpp
@@ -827,6 +827,13 @@ void TestWebChannel::testWrapValues()
QVERIFY(value.isDouble());
QCOMPARE(value.toInt(), (int) flags);
}
+ {
+ QVector<int> vec{1, 2, 3};
+ QVariant variant = QVariant::fromValue(vec);
+ QJsonValue value = channel.d_func()->publisher->wrapResult(variant, m_dummyTransport);
+ QVERIFY(value.isArray());
+ QCOMPARE(value.toArray(), QJsonArray({1, 2, 3}));
+ }
}
void TestWebChannel::testWrapObjectWithMultipleTransports()