summaryrefslogtreecommitdiff
path: root/tests/auto/webchannel/tst_webchannel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/webchannel/tst_webchannel.cpp')
-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 57aab53..27ef81c 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()