diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-09-10 07:57:59 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-09-10 07:57:59 +0000 |
| commit | 3488995080d1627f53a4f9215f3a3b67fadb98b1 (patch) | |
| tree | b44e0cd31c02217871628ddc9dee4deb85fb03e8 /tests/tests.cpp | |
| parent | a1c92edc6b6544226976aaf9584dd73cb31f5933 (diff) | |
| download | qxmpp-3488995080d1627f53a4f9215f3a3b67fadb98b1.tar.gz | |
explictly test id/from/to/type for version IQs
Diffstat (limited to 'tests/tests.cpp')
| -rw-r--r-- | tests/tests.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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")); |
