From 3b98c0f399f464653c18ad4a5a54fd73c8999d07 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Mon, 9 Aug 2010 16:03:34 +0000 Subject: test array and struct --- example/tests/tests.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'example/tests/tests.cpp') diff --git a/example/tests/tests.cpp b/example/tests/tests.cpp index 8125e5c3..86c6d4c9 100644 --- a/example/tests/tests.cpp +++ b/example/tests/tests.cpp @@ -383,6 +383,33 @@ void TestXmlRpc::testString() QByteArray("hello world")); } +void TestXmlRpc::testArray() +{ + checkVariant(QVariantList() << QString("hello world") << double(-12.214), + QByteArray("" + "hello world" + "-12.214" + "")); +} + +void TestXmlRpc::testStruct() +{ + QMap map; + map["bar"] = QString("hello world"); + map["foo"] = double(-12.214); + checkVariant(map, + QByteArray("" + "" + "bar" + "hello world" + "" + "" + "foo" + "-12.214" + "" + "")); +} + int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); -- cgit v1.2.3