From 3488995080d1627f53a4f9215f3a3b67fadb98b1 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Fri, 10 Sep 2010 07:57:59 +0000 Subject: explictly test id/from/to/type for version IQs --- tests/tests.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/tests.cpp') diff --git a/tests/tests.cpp b/tests/tests.cpp index 911e7571..875448ad 100644 --- a/tests/tests.cpp +++ b/tests/tests.cpp @@ -544,6 +544,10 @@ void TestPackets::testVersionGet() QXmppVersionIq verIqGet; parsePacket(verIqGet, xmlGet); + QCOMPARE(verIqGet.id(), QLatin1String("version_1")); + QCOMPARE(verIqGet.to(), QLatin1String("juliet@capulet.com/balcony")); + QCOMPARE(verIqGet.from(), QLatin1String("romeo@montague.net/orchard")); + QCOMPARE(verIqGet.type(), QXmppIq::Get); serializePacket(verIqGet, xmlGet); } @@ -560,6 +564,10 @@ void TestPackets::testVersionResult() QXmppVersionIq verIqResult; parsePacket(verIqResult, xmlResult); + QCOMPARE(verIqResult.id(), QLatin1String("version_1")); + QCOMPARE(verIqResult.to(), QLatin1String("romeo@montague.net/orchard")); + QCOMPARE(verIqResult.from(), QLatin1String("juliet@capulet.com/balcony")); + QCOMPARE(verIqResult.type(), QXmppIq::Result); QCOMPARE(verIqResult.name(), QString("qxmpp")); QCOMPARE(verIqResult.version(), QString("0.2.0")); QCOMPARE(verIqResult.os(), QString("Windows-XP")); -- cgit v1.2.3