diff options
Diffstat (limited to 'tests/auto/webchannel/tst_webchannel.cpp')
-rw-r--r-- | tests/auto/webchannel/tst_webchannel.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/webchannel/tst_webchannel.cpp b/tests/auto/webchannel/tst_webchannel.cpp index 9a0f575..133655d 100644 --- a/tests/auto/webchannel/tst_webchannel.cpp +++ b/tests/auto/webchannel/tst_webchannel.cpp @@ -797,6 +797,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() |