aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2012-09-27 17:28:14 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2012-09-27 17:28:14 +0200
commit49600c7d56b16d7b60705f170e9dff4daf58688c (patch)
tree31429812a198e05c85aa62e422267f57964e2825 /tests
parentd021386aaae364598f4b95222337912cb5b3acce (diff)
downloadqxmpp-49600c7d56b16d7b60705f170e9dff4daf58688c.tar.gz
split QXmppJingleIq tests
Diffstat (limited to 'tests')
-rw-r--r--tests/all/all.pro2
-rw-r--r--tests/all/jingle.h37
-rw-r--r--tests/all/tests.cpp4
-rw-r--r--tests/qxmppjingleiq/qxmppjingleiq.pro3
-rw-r--r--tests/qxmppjingleiq/tst_qxmppjingleiq.cpp (renamed from tests/all/jingle.cpp)28
-rw-r--r--tests/tests.pro1
6 files changed, 25 insertions, 50 deletions
diff --git a/tests/all/all.pro b/tests/all/all.pro
index d32e7f9b..5ba9e1f3 100644
--- a/tests/all/all.pro
+++ b/tests/all/all.pro
@@ -4,11 +4,9 @@ TARGET = tst_all
RESOURCES += tests.qrc
SOURCES += \
- jingle.cpp \
rpc.cpp \
tests.cpp
HEADERS += \
- jingle.h \
rpc.h \
tests.h
diff --git a/tests/all/jingle.h b/tests/all/jingle.h
deleted file mode 100644
index 9098e8da..00000000
--- a/tests/all/jingle.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2008-2012 The QXmpp developers
- *
- * Author:
- * Jeremy Lainé
- *
- * Source:
- * http://code.google.com/p/qxmpp
- *
- * This file is a part of QXmpp library.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- */
-
-#include <QObject>
-
-class TestJingle : public QObject
-{
- Q_OBJECT
-
-private slots:
- void testSession();
- void testTerminate();
- void testAudioPayloadType();
- void testVideoPayloadType();
- void testRinging();
-};
-
diff --git a/tests/all/tests.cpp b/tests/all/tests.cpp
index d38d7db8..8fd2b806 100644
--- a/tests/all/tests.cpp
+++ b/tests/all/tests.cpp
@@ -44,7 +44,6 @@
#include "QXmppGlobal.h"
#include "QXmppEntityTimeIq.h"
-#include "jingle.h"
#include "rpc.h"
#include "sasl.h"
#include "tests.h"
@@ -878,9 +877,6 @@ int main(int argc, char *argv[])
TestPackets testPackets;
errors += QTest::qExec(&testPackets);
- TestJingle testJingle;
- errors += QTest::qExec(&testJingle);
-
TestPubSub testPubSub;
errors += QTest::qExec(&testPubSub);
diff --git a/tests/qxmppjingleiq/qxmppjingleiq.pro b/tests/qxmppjingleiq/qxmppjingleiq.pro
new file mode 100644
index 00000000..9518df55
--- /dev/null
+++ b/tests/qxmppjingleiq/qxmppjingleiq.pro
@@ -0,0 +1,3 @@
+include(../tests.pri)
+TARGET = tst_qxmppjingleiq
+SOURCES += tst_qxmppjingleiq.cpp
diff --git a/tests/all/jingle.cpp b/tests/qxmppjingleiq/tst_qxmppjingleiq.cpp
index 90aa3797..aca95867 100644
--- a/tests/all/jingle.cpp
+++ b/tests/qxmppjingleiq/tst_qxmppjingleiq.cpp
@@ -21,12 +21,23 @@
*
*/
+#include <QObject>
#include "QXmppJingleIq.h"
-
-#include "jingle.h"
#include "util.h"
-void TestJingle::testSession()
+class tst_QXmppJingleIq : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void testSession();
+ void testTerminate();
+ void testAudioPayloadType();
+ void testVideoPayloadType();
+ void testRinging();
+};
+
+void tst_QXmppJingleIq::testSession()
{
const QByteArray xml(
"<iq"
@@ -57,7 +68,7 @@ void TestJingle::testSession()
serializePacket(session, xml);
}
-void TestJingle::testTerminate()
+void tst_QXmppJingleIq::testTerminate()
{
const QByteArray xml(
"<iq"
@@ -84,7 +95,7 @@ void TestJingle::testTerminate()
serializePacket(session, xml);
}
-void TestJingle::testAudioPayloadType()
+void tst_QXmppJingleIq::testAudioPayloadType()
{
const QByteArray xml("<payload-type id=\"103\" name=\"L16\" channels=\"2\" clockrate=\"16000\"/>");
QXmppJinglePayloadType payload;
@@ -96,7 +107,7 @@ void TestJingle::testAudioPayloadType()
serializePacket(payload, xml);
}
-void TestJingle::testVideoPayloadType()
+void tst_QXmppJingleIq::testVideoPayloadType()
{
const QByteArray xml(
"<payload-type id=\"98\" name=\"theora\" clockrate=\"90000\">"
@@ -114,7 +125,7 @@ void TestJingle::testVideoPayloadType()
serializePacket(payload, xml);
}
-void TestJingle::testRinging()
+void tst_QXmppJingleIq::testRinging()
{
const QByteArray xml(
"<iq"
@@ -135,3 +146,6 @@ void TestJingle::testRinging()
QCOMPARE(iq.ringing(), true);
serializePacket(iq, xml);
}
+
+QTEST_MAIN(tst_QXmppJingleIq)
+#include "tst_qxmppjingleiq.moc"
diff --git a/tests/tests.pro b/tests/tests.pro
index e52216a7..47f6ff94 100644
--- a/tests/tests.pro
+++ b/tests/tests.pro
@@ -3,6 +3,7 @@ SUBDIRS = \
all \
qxmppdataform \
qxmppiq \
+ qxmppjingleiq \
qxmppmessage \
qxmpppresence \
qxmppregisteriq \