From 04298058cd84d2e2f1b53fa2e032dddf480259f2 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Mon, 9 Aug 2010 15:54:01 +0000 Subject: test int & base64 --- example/tests/tests.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'example/tests/tests.cpp') diff --git a/example/tests/tests.cpp b/example/tests/tests.cpp index b8ab9c63..8125e5c3 100644 --- a/example/tests/tests.cpp +++ b/example/tests/tests.cpp @@ -344,6 +344,12 @@ static void checkVariant(const QVariant &value, const QByteArray &xml) QCOMPARE(test, value); } +void TestXmlRpc::testBase64() +{ + checkVariant(QByteArray("\0\1\2\3", 4), + QByteArray("AAECAw==")); +} + void TestXmlRpc::testBool() { // FIXME : XML-RPC spec says we should write "0" or "1" @@ -365,6 +371,12 @@ void TestXmlRpc::testDouble() QByteArray("-12.214")); } +void TestXmlRpc::testInt() +{ + checkVariant(int(-12), + QByteArray("-12")); +} + void TestXmlRpc::testString() { checkVariant(QString("hello world"), -- cgit v1.2.3