From 10a6e8681fd32d67767f53f4e17166586d567494 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Mon, 1 Oct 2012 14:00:36 +0200 Subject: split QXmppEntityTimeIq tests --- tests/all/tests.cpp | 41 ----------------------------------------- 1 file changed, 41 deletions(-) (limited to 'tests/all/tests.cpp') diff --git a/tests/all/tests.cpp b/tests/all/tests.cpp index 0965f764..7ac5c5e7 100644 --- a/tests/all/tests.cpp +++ b/tests/all/tests.cpp @@ -22,7 +22,6 @@ * */ -#include "QXmppEntityTimeIq.h" #include "QXmppNonSASLAuth.h" #include "QXmppSessionIq.h" #include "QXmppStreamFeatures.h" @@ -37,8 +36,6 @@ private slots: void testNonSaslAuth(); void testSession(); void testStreamFeatures(); - void testEntityTimeGet(); - void testEntityTimeResult(); }; void TestPackets::testNonSaslAuth() @@ -135,43 +132,5 @@ void TestPackets::testStreamFeatures() serializePacket(features2, xml2); } -void TestPackets::testEntityTimeGet() -{ - const QByteArray xml("" - ""); - - QXmppEntityTimeIq entityTime; - parsePacket(entityTime, xml); - QCOMPARE(entityTime.id(), QLatin1String("time_1")); - QCOMPARE(entityTime.to(), QLatin1String("juliet@capulet.com/balcony")); - QCOMPARE(entityTime.from(), QLatin1String("romeo@montague.net/orchard")); - QCOMPARE(entityTime.type(), QXmppIq::Get); - serializePacket(entityTime, xml); -} - -void TestPackets::testEntityTimeResult() -{ - const QByteArray xml( - "" - "" - ""); - - QXmppEntityTimeIq entityTime; - parsePacket(entityTime, xml); - QCOMPARE(entityTime.id(), QLatin1String("time_1")); - QCOMPARE(entityTime.from(), QLatin1String("juliet@capulet.com/balcony")); - QCOMPARE(entityTime.to(), QLatin1String("romeo@montague.net/orchard")); - QCOMPARE(entityTime.type(), QXmppIq::Result); - QCOMPARE(entityTime.tzo(), -21600); - QCOMPARE(entityTime.utc(), QDateTime(QDate(2006, 12, 19), QTime(17, 58, 35), Qt::UTC)); - serializePacket(entityTime, xml); -} - QTEST_MAIN(TestPackets) #include "tests.moc" -- cgit v1.2.3