aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMelvin Keskin <melvo@olomono.de>2022-01-08 08:26:46 +0000
committerLinus Jahn <lnj@kaidan.im>2022-01-15 14:04:15 +0100
commitfd11e024a6079be3e0bc62911b6e3070c7553224 (patch)
tree199a3d658bc1641259faffd588534788fadb05dd /tests
parentee1ea9091f128164f91d29d7a3598d792326c1a7 (diff)
downloadqxmpp-fd11e024a6079be3e0bc62911b6e3070c7553224.tar.gz
Run 'clang-format' on all files
Diffstat (limited to 'tests')
-rw-r--r--tests/IntegrationTesting.h18
-rw-r--r--tests/qxmppcarbonmanager/tst_qxmppcarbonmanager.cpp12
-rw-r--r--tests/qxmppiceconnection/tst_qxmppiceconnection.cpp2
-rw-r--r--tests/qxmppmessagereceiptmanager/tst_qxmppmessagereceiptmanager.cpp8
-rw-r--r--tests/qxmpppubsubmanager/tst_qxmpppubsubmanager.cpp130
-rw-r--r--tests/qxmpppushenableiq/tst_qxmpppushenableiq.cpp9
-rw-r--r--tests/qxmpprosteriq/tst_qxmpprosteriq.cpp16
-rw-r--r--tests/qxmppsceenvelope/tst_qxmppsceenvelope.cpp4
-rw-r--r--tests/qxmppserver/tst_qxmppserver.cpp2
-rw-r--r--tests/qxmppstanza/tst_qxmppstanza.cpp24
-rw-r--r--tests/qxmpptransfermanager/tst_qxmpptransfermanager.cpp2
-rw-r--r--tests/qxmppuploadrequestmanager/tst_qxmppuploadrequestmanager.cpp18
-rw-r--r--tests/qxmppvcardmanager/tst_qxmppvcardmanager.cpp6
-rw-r--r--tests/util.h2
14 files changed, 126 insertions, 127 deletions
diff --git a/tests/IntegrationTesting.h b/tests/IntegrationTesting.h
index e8db182c..9733295e 100644
--- a/tests/IntegrationTesting.h
+++ b/tests/IntegrationTesting.h
@@ -5,21 +5,21 @@
#ifndef INTEGRATIONTESTING_H
#define INTEGRATIONTESTING_H
-#include <QtGlobal>
-#include <QDebug>
-
#include "QXmppConfiguration.h"
+#include <QDebug>
+#include <QtGlobal>
+
#define ENV_ENABLED "QXMPP_TESTS_INTEGRATION_ENABLED"
#define ENV_JID "QXMPP_TESTS_JID"
#define ENV_PASSWORD "QXMPP_TESTS_PASSWORD"
-#define SKIP_IF_INTEGRATION_TESTS_DISABLED() \
- if (!IntegrationTests::enabled()) { \
+#define SKIP_IF_INTEGRATION_TESTS_DISABLED() \
+ if (!IntegrationTests::enabled()) { \
QSKIP("Export 'QXMPP_TESTS_INTEGRATION_ENABLED=1' to enable."); \
- } else if (!IntegrationTests::credentialsAvailable()) { \
- QFAIL("No credentials for integration tests provided! " \
- "Export 'QXMPP_TESTS_JID' and 'QXMPP_TESTS_PASSWORD'."); \
+ } else if (!IntegrationTests::credentialsAvailable()) { \
+ QFAIL("No credentials for integration tests provided! " \
+ "Export 'QXMPP_TESTS_JID' and 'QXMPP_TESTS_PASSWORD'."); \
}
class IntegrationTests
@@ -57,4 +57,4 @@ public:
#undef ENV_JID
#undef ENV_PASSWORD
-#endif // INTEGRATIONTESTING_H
+#endif // INTEGRATIONTESTING_H
diff --git a/tests/qxmppcarbonmanager/tst_qxmppcarbonmanager.cpp b/tests/qxmppcarbonmanager/tst_qxmppcarbonmanager.cpp
index a4426ac6..81230d6c 100644
--- a/tests/qxmppcarbonmanager/tst_qxmppcarbonmanager.cpp
+++ b/tests/qxmppcarbonmanager/tst_qxmppcarbonmanager.cpp
@@ -15,15 +15,15 @@ class QXmppCarbonTestHelper : public QObject
Q_OBJECT
public slots:
- void messageSent(const QXmppMessage& msg);
- void messageReceived(const QXmppMessage& msg);
+ void messageSent(const QXmppMessage &msg);
+ void messageReceived(const QXmppMessage &msg);
public:
QXmppMessage m_expectedMessage;
bool m_expectSent;
bool m_signalTriggered;
- void compareMessages(const QXmppMessage& lhs, const QXmppMessage& rhs);
+ void compareMessages(const QXmppMessage &lhs, const QXmppMessage &rhs);
};
class tst_QXmppCarbonManager : public QObject
@@ -215,7 +215,7 @@ void tst_QXmppCarbonManager::testHandleStanza()
QCOMPARE(m_helper.m_signalTriggered, accept);
}
-void QXmppCarbonTestHelper::messageSent(const QXmppMessage& msg)
+void QXmppCarbonTestHelper::messageSent(const QXmppMessage &msg)
{
m_signalTriggered = true;
QCOMPARE(m_expectSent, true);
@@ -223,7 +223,7 @@ void QXmppCarbonTestHelper::messageSent(const QXmppMessage& msg)
compareMessages(m_expectedMessage, msg);
}
-void QXmppCarbonTestHelper::messageReceived(const QXmppMessage& msg)
+void QXmppCarbonTestHelper::messageReceived(const QXmppMessage &msg)
{
m_signalTriggered = true;
QCOMPARE(m_expectSent, false);
@@ -231,7 +231,7 @@ void QXmppCarbonTestHelper::messageReceived(const QXmppMessage& msg)
compareMessages(m_expectedMessage, msg);
}
-void QXmppCarbonTestHelper::compareMessages(const QXmppMessage& lhs, const QXmppMessage& rhs)
+void QXmppCarbonTestHelper::compareMessages(const QXmppMessage &lhs, const QXmppMessage &rhs)
{
QCOMPARE(lhs.body(), rhs.body());
QCOMPARE(lhs.from(), rhs.from());
diff --git a/tests/qxmppiceconnection/tst_qxmppiceconnection.cpp b/tests/qxmppiceconnection/tst_qxmppiceconnection.cpp
index f73b7b72..bfd03771 100644
--- a/tests/qxmppiceconnection/tst_qxmppiceconnection.cpp
+++ b/tests/qxmppiceconnection/tst_qxmppiceconnection.cpp
@@ -61,7 +61,7 @@ void tst_QXmppIceConnection::testBindStun()
client.setIceControlling(true);
QList<QPair<QHostAddress, quint16>> stunServers;
for (auto &address : stunInfo.addresses()) {
- stunServers.push_back({address, 19302});
+ stunServers.push_back({ address, 19302 });
}
client.setStunServers(stunServers);
client.addComponent(componentId);
diff --git a/tests/qxmppmessagereceiptmanager/tst_qxmppmessagereceiptmanager.cpp b/tests/qxmppmessagereceiptmanager/tst_qxmppmessagereceiptmanager.cpp
index 54d45f7c..97ba48f4 100644
--- a/tests/qxmppmessagereceiptmanager/tst_qxmppmessagereceiptmanager.cpp
+++ b/tests/qxmppmessagereceiptmanager/tst_qxmppmessagereceiptmanager.cpp
@@ -18,19 +18,19 @@ private slots:
void testReceipt_data();
void testReceipt();
- void handleMessageDelivered(const QString&, const QString&)
+ void handleMessageDelivered(const QString &, const QString &)
{
m_messageDelivered = true;
}
- void onLoggerMessage(QXmppLogger::MessageType type, const QString& text)
+ void onLoggerMessage(QXmppLogger::MessageType type, const QString &text)
{
m_receiptSent = true;
}
private:
- QXmppMessageReceiptManager* m_manager;
+ QXmppMessageReceiptManager *m_manager;
QXmppClient m_client;
- QXmppLogger* m_logger;
+ QXmppLogger *m_logger;
bool m_messageDelivered = false;
bool m_receiptSent = false;
};
diff --git a/tests/qxmpppubsubmanager/tst_qxmpppubsubmanager.cpp b/tests/qxmpppubsubmanager/tst_qxmpppubsubmanager.cpp
index 90893333..1f17d870 100644
--- a/tests/qxmpppubsubmanager/tst_qxmpppubsubmanager.cpp
+++ b/tests/qxmpppubsubmanager/tst_qxmpppubsubmanager.cpp
@@ -50,7 +50,7 @@ public:
struct Client
{
- Client() {}
+ Client() { }
Client(const QString &jid)
{
test.configuration().setJid(jid);
@@ -100,7 +100,7 @@ void tst_QXmppPubSubManager::testDiscoFeatures()
{
// so the coverage report is happy:
PSManager manager;
- QCOMPARE(manager.discoveryFeatures(), QStringList {"http://jabber.org/protocol/pubsub#rsm"});
+ QCOMPARE(manager.discoveryFeatures(), QStringList { "http://jabber.org/protocol/pubsub#rsm" });
}
void tst_QXmppPubSubManager::testFetchNodes()
@@ -904,71 +904,71 @@ void tst_QXmppPubSubManager::testEventNotifications_data()
QTest::addColumn<bool>("accepted");
QTest::addRow("default")
- << QStringLiteral(
- "<message from='pubsub.shakespeare.lit' to='francisco@denmark.lit' id='foo'>"
- "<event xmlns='http://jabber.org/protocol/pubsub#event'>"
- "<items node='princely_musings'>"
- "<item id='ae890ac52d0df67ed7cfdf51b644e901'>"
- "<entry xmlns='http://www.w3.org/2005/Atom'>"
- "<title>Soliloquy</title>"
- "<summary>"
- "To be, or not to be: that is the question:"
- "Whether 'tis nobler in the mind to suffer"
- "The slings and arrows of outrageous fortune,"
- "Or to take arms against a sea of troubles,"
- "And by opposing end them?"
- "</summary>"
- "<link rel='alternate' type='text/html' href='http://denmark.lit/2003/12/13/atom03'/>"
- "<id>tag:denmark.lit,2003:entry-32397</id>"
- "<published>2003-12-13T18:30:02Z</published>"
- "<updated>2003-12-13T18:30:02Z</updated>"
- "</entry>"
- "</item>"
- "</items>"
- "</event>"
- "</message>")
- << true;
+ << QStringLiteral(
+ "<message from='pubsub.shakespeare.lit' to='francisco@denmark.lit' id='foo'>"
+ "<event xmlns='http://jabber.org/protocol/pubsub#event'>"
+ "<items node='princely_musings'>"
+ "<item id='ae890ac52d0df67ed7cfdf51b644e901'>"
+ "<entry xmlns='http://www.w3.org/2005/Atom'>"
+ "<title>Soliloquy</title>"
+ "<summary>"
+ "To be, or not to be: that is the question:"
+ "Whether 'tis nobler in the mind to suffer"
+ "The slings and arrows of outrageous fortune,"
+ "Or to take arms against a sea of troubles,"
+ "And by opposing end them?"
+ "</summary>"
+ "<link rel='alternate' type='text/html' href='http://denmark.lit/2003/12/13/atom03'/>"
+ "<id>tag:denmark.lit,2003:entry-32397</id>"
+ "<published>2003-12-13T18:30:02Z</published>"
+ "<updated>2003-12-13T18:30:02Z</updated>"
+ "</entry>"
+ "</item>"
+ "</items>"
+ "</event>"
+ "</message>")
+ << true;
QTest::addRow("additional-subelement")
- << QStringLiteral(
- "<message from='pubsub.shakespeare.lit' to='francisco@denmark.lit' id='foo'>"
- "<always-store xmlns='hints2'/>"
- "<event xmlns='http://jabber.org/protocol/pubsub#event'>"
- "<items node='princely_musings'>"
- "<item id='ae890ac52d0df67ed7cfdf51b644e901'>"
- "<entry xmlns='http://www.w3.org/2005/Atom'>"
- "<title>Soliloquy</title>"
- "<summary>"
- "To be, or not to be: that is the question:"
- "Whether 'tis nobler in the mind to suffer"
- "The slings and arrows of outrageous fortune,"
- "Or to take arms against a sea of troubles,"
- "And by opposing end them?"
- "</summary>"
- "<link rel='alternate' type='text/html' href='http://denmark.lit/2003/12/13/atom03'/>"
- "<id>tag:denmark.lit,2003:entry-32397</id>"
- "<published>2003-12-13T18:30:02Z</published>"
- "<updated>2003-12-13T18:30:02Z</updated>"
- "</entry>"
- "</item>"
- "</items>"
- "</event>"
- "</message>")
- << true;
+ << QStringLiteral(
+ "<message from='pubsub.shakespeare.lit' to='francisco@denmark.lit' id='foo'>"
+ "<always-store xmlns='hints2'/>"
+ "<event xmlns='http://jabber.org/protocol/pubsub#event'>"
+ "<items node='princely_musings'>"
+ "<item id='ae890ac52d0df67ed7cfdf51b644e901'>"
+ "<entry xmlns='http://www.w3.org/2005/Atom'>"
+ "<title>Soliloquy</title>"
+ "<summary>"
+ "To be, or not to be: that is the question:"
+ "Whether 'tis nobler in the mind to suffer"
+ "The slings and arrows of outrageous fortune,"
+ "Or to take arms against a sea of troubles,"
+ "And by opposing end them?"
+ "</summary>"
+ "<link rel='alternate' type='text/html' href='http://denmark.lit/2003/12/13/atom03'/>"
+ "<id>tag:denmark.lit,2003:entry-32397</id>"
+ "<published>2003-12-13T18:30:02Z</published>"
+ "<updated>2003-12-13T18:30:02Z</updated>"
+ "</entry>"
+ "</item>"
+ "</items>"
+ "</event>"
+ "</message>")
+ << true;
QTest::addRow("wrong-event-namespace")
- << QStringLiteral(
- "<message from='pubsub.shakespeare.lit' to='francisco@denmark.lit' id='foo'>"
- "<always-store xmlns='hints2'/>"
- "<event xmlns='pubsub2#event'>"
- "<items node='princely_musings'>"
- "<item id='ae890ac52d0df67ed7cfdf51b644e901'>"
- "<entry xmlns='http://www.w3.org/2005/Atom'>"
- "<title>Soliloquy</title>"
- "</entry>"
- "</item>"
- "</items>"
- "</event>"
- "</message>")
- << false;
+ << QStringLiteral(
+ "<message from='pubsub.shakespeare.lit' to='francisco@denmark.lit' id='foo'>"
+ "<always-store xmlns='hints2'/>"
+ "<event xmlns='pubsub2#event'>"
+ "<items node='princely_musings'>"
+ "<item id='ae890ac52d0df67ed7cfdf51b644e901'>"
+ "<entry xmlns='http://www.w3.org/2005/Atom'>"
+ "<title>Soliloquy</title>"
+ "</entry>"
+ "</item>"
+ "</items>"
+ "</event>"
+ "</message>")
+ << false;
}
void tst_QXmppPubSubManager::testEventNotifications()
diff --git a/tests/qxmpppushenableiq/tst_qxmpppushenableiq.cpp b/tests/qxmpppushenableiq/tst_qxmpppushenableiq.cpp
index 4d561359..8cef930c 100644
--- a/tests/qxmpppushenableiq/tst_qxmpppushenableiq.cpp
+++ b/tests/qxmpppushenableiq/tst_qxmpppushenableiq.cpp
@@ -2,10 +2,11 @@
//
// SPDX-License-Identifier: LGPL-2.1-or-later
-#include <QObject>
-#include "util.h"
-#include <QXmppPushEnableIq.h>
#include <QXmppDataForm.h>
+#include <QXmppPushEnableIq.h>
+
+#include "util.h"
+#include <QObject>
class tst_QXmppPushEnableIq : public QObject
{
@@ -112,7 +113,7 @@ void tst_QXmppPushEnableIq::testDataForm()
QXmppDataForm form;
form.setType(QXmppDataForm::Submit);
- form.setFields({field0, field1});
+ form.setFields({ field0, field1 });
sIq.setDataForm(form);
diff --git a/tests/qxmpprosteriq/tst_qxmpprosteriq.cpp b/tests/qxmpprosteriq/tst_qxmpprosteriq.cpp
index 12a54712..728bd9ee 100644
--- a/tests/qxmpprosteriq/tst_qxmpprosteriq.cpp
+++ b/tests/qxmpprosteriq/tst_qxmpprosteriq.cpp
@@ -166,12 +166,11 @@ void tst_QXmppRosterIq::testMixAnnotate()
{
const QByteArray xml(
"<iq from=\"juliet@example.com/balcony\" "
- "type=\"get\">"
- "<query xmlns=\"jabber:iq:roster\">"
- "<annotate xmlns=\"urn:xmpp:mix:roster:0\"/>"
- "</query>"
- "</iq>"
- );
+ "type=\"get\">"
+ "<query xmlns=\"jabber:iq:roster\">"
+ "<annotate xmlns=\"urn:xmpp:mix:roster:0\"/>"
+ "</query>"
+ "</iq>");
QXmppRosterIq iq;
parsePacket(iq, xml);
@@ -186,9 +185,8 @@ void tst_QXmppRosterIq::testMixChannel()
{
const QByteArray xml(
"<item jid=\"balcony@example.net\">"
- "<channel xmlns=\"urn:xmpp:mix:roster:0\" participant-id=\"123456\"/>"
- "</item>"
- );
+ "<channel xmlns=\"urn:xmpp:mix:roster:0\" participant-id=\"123456\"/>"
+ "</item>");
QXmppRosterIq::Item item;
parsePacket(item, xml);
diff --git a/tests/qxmppsceenvelope/tst_qxmppsceenvelope.cpp b/tests/qxmppsceenvelope/tst_qxmppsceenvelope.cpp
index 2909f052..a490a5c0 100644
--- a/tests/qxmppsceenvelope/tst_qxmppsceenvelope.cpp
+++ b/tests/qxmppsceenvelope/tst_qxmppsceenvelope.cpp
@@ -31,7 +31,7 @@ void tst_QXmppSceEnvelope::testReader()
QXmppSceEnvelopeReader reader(dom);
QCOMPARE(reader.from(), QStringLiteral("opportunity@mars.planet"));
QCOMPARE(reader.to(), QStringLiteral("missioncontrol@houston.nasa.gov"));
- QCOMPARE(reader.timestamp(), QDateTime({2004, 01, 25}, {05, 05, 00}, Qt::UTC));
+ QCOMPARE(reader.timestamp(), QDateTime({ 2004, 01, 25 }, { 05, 05, 00 }, Qt::UTC));
QCOMPARE(reader.contentElement().firstChildElement().tagName(), QStringLiteral("body"));
}
@@ -60,7 +60,7 @@ void tst_QXmppSceEnvelope::testWriter()
writer.writeTextElement("url", "https://en.wikipedia.org/wiki/Fight_Club#Plot");
writer.writeEndElement();
});
- envelope.writeTimestamp(QDateTime({2004, 01, 25}, {05, 05, 00}, Qt::UTC));
+ envelope.writeTimestamp(QDateTime({ 2004, 01, 25 }, { 05, 05, 00 }, Qt::UTC));
envelope.writeTo("missioncontrol@houston.nasa.gov");
envelope.writeFrom("opportunity@mars.planet");
envelope.writeRpad("C1DHN9HK-9A25tSmwK4hU!Jji9%GKYK^syIlHJT9TnI4");
diff --git a/tests/qxmppserver/tst_qxmppserver.cpp b/tests/qxmppserver/tst_qxmppserver.cpp
index 34376f96..8715d205 100644
--- a/tests/qxmppserver/tst_qxmppserver.cpp
+++ b/tests/qxmppserver/tst_qxmppserver.cpp
@@ -56,7 +56,7 @@ void tst_QXmppServer::testConnect()
const quint16 testPort = 12345;
QXmppLogger logger;
- //logger.setLoggingType(QXmppLogger::StdoutLogging);
+ // logger.setLoggingType(QXmppLogger::StdoutLogging);
// prepare server
TestPasswordChecker passwordChecker;
diff --git a/tests/qxmppstanza/tst_qxmppstanza.cpp b/tests/qxmppstanza/tst_qxmppstanza.cpp
index ac11b05a..cff33e43 100644
--- a/tests/qxmppstanza/tst_qxmppstanza.cpp
+++ b/tests/qxmppstanza/tst_qxmppstanza.cpp
@@ -71,19 +71,19 @@ void tst_QXmppStanza::testErrorCases_data()
QTest::addColumn<QString>("by");
#define ROW(name, xml, type, condition, text, redirect, by) \
- QTest::newRow(QT_STRINGIFY(name)) \
- << QByteArrayLiteral(xml) \
- << QXmppStanza::Error::type \
- << QXmppStanza::Error::condition \
- << text \
- << redirect \
+ QTest::newRow(QT_STRINGIFY(name)) \
+ << QByteArrayLiteral(xml) \
+ << QXmppStanza::Error::type \
+ << QXmppStanza::Error::condition \
+ << text \
+ << redirect \
<< by
#define BASIC(xml, type, condition) \
ROW(condition, xml, type, condition, QString(), QString(), QString())
ROW(
- empty-text,
+ empty - text,
"<error type=\"modify\">"
"<bad-request xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\"/>"
"</error>",
@@ -93,7 +93,7 @@ void tst_QXmppStanza::testErrorCases_data()
QString(),
QString());
ROW(
- redirection-uri-gone,
+ redirection - uri - gone,
"<error by=\"example.net\" type=\"cancel\">"
"<gone xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\">"
"xmpp:romeo@afterlife.example.net"
@@ -105,7 +105,7 @@ void tst_QXmppStanza::testErrorCases_data()
"xmpp:romeo@afterlife.example.net",
"example.net");
ROW(
- redirection-uri-redirect,
+ redirection - uri - redirect,
"<error type=\"cancel\">"
"<redirect xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\">"
"xmpp:rms@afterlife.example.net"
@@ -117,7 +117,7 @@ void tst_QXmppStanza::testErrorCases_data()
"xmpp:rms@afterlife.example.net",
QString());
ROW(
- redirection-uri-empty,
+ redirection - uri - empty,
"<error type=\"cancel\">"
"<redirect xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\"/>"
"</error>",
@@ -127,7 +127,7 @@ void tst_QXmppStanza::testErrorCases_data()
QString(),
QString());
ROW(
- policy-violation-text,
+ policy - violation - text,
"<error by=\"example.net\" type=\"modify\">"
"<policy-violation xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\"/>"
"<text xml:lang=\"en\" xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\">The used words are not allowed on this server.</text>"
@@ -138,7 +138,7 @@ void tst_QXmppStanza::testErrorCases_data()
QString(),
"example.net");
ROW(
- jid-malformed-with-by,
+ jid - malformed - with - by,
"<error by=\"muc.example.com\" type=\"modify\">"
"<jid-malformed xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\"/>"
"</error>",
diff --git a/tests/qxmpptransfermanager/tst_qxmpptransfermanager.cpp b/tests/qxmpptransfermanager/tst_qxmpptransfermanager.cpp
index 117cd028..4440b1ae 100644
--- a/tests/qxmpptransfermanager/tst_qxmpptransfermanager.cpp
+++ b/tests/qxmpptransfermanager/tst_qxmpptransfermanager.cpp
@@ -70,7 +70,7 @@ void tst_QXmppTransferManager::testSendFile()
const quint16 testPort = 12345;
QXmppLogger logger;
- //logger.setLoggingType(QXmppLogger::StdoutLogging);
+ // logger.setLoggingType(QXmppLogger::StdoutLogging);
// prepare server
TestPasswordChecker passwordChecker;
diff --git a/tests/qxmppuploadrequestmanager/tst_qxmppuploadrequestmanager.cpp b/tests/qxmppuploadrequestmanager/tst_qxmppuploadrequestmanager.cpp
index 86e4d8a6..9306f4da 100644
--- a/tests/qxmppuploadrequestmanager/tst_qxmppuploadrequestmanager.cpp
+++ b/tests/qxmppuploadrequestmanager/tst_qxmppuploadrequestmanager.cpp
@@ -23,8 +23,8 @@ public:
~TestHelper();
public slots:
- void onSlotReceived(const QXmppHttpUploadSlotIq& slot);
- void onRequestFailed(const QXmppHttpUploadRequestIq& request);
+ void onSlotReceived(const QXmppHttpUploadSlotIq &slot);
+ void onRequestFailed(const QXmppHttpUploadRequestIq &request);
private:
bool expectedEvent;
@@ -47,13 +47,13 @@ TestHelper::~TestHelper()
QCOMPARE(error, expectedError);
}
-void TestHelper::onRequestFailed(const QXmppHttpUploadRequestIq& request)
+void TestHelper::onRequestFailed(const QXmppHttpUploadRequestIq &request)
{
event = true;
error = true;
}
-void TestHelper::onSlotReceived(const QXmppHttpUploadSlotIq& slot)
+void TestHelper::onSlotReceived(const QXmppHttpUploadSlotIq &slot)
{
event = true;
error = false;
@@ -64,7 +64,7 @@ class tst_QXmppUploadRequestManager : public QObject
Q_OBJECT
protected slots:
- void onLoggerMessage(QXmppLogger::MessageType type, const QString& text) const;
+ void onLoggerMessage(QXmppLogger::MessageType type, const QString &text) const;
private slots:
void initTestCase();
@@ -81,9 +81,9 @@ private slots:
void testUploadService();
private:
- QXmppUploadRequestManager* manager;
+ QXmppUploadRequestManager *manager;
QXmppClient client;
- QXmppDiscoveryManager* discovery;
+ QXmppDiscoveryManager *discovery;
QString uploadServiceName;
qint64 maxFileSize;
@@ -92,7 +92,7 @@ private:
qint64 lastFileSize;
};
-void tst_QXmppUploadRequestManager::onLoggerMessage(QXmppLogger::MessageType type, const QString& text) const
+void tst_QXmppUploadRequestManager::onLoggerMessage(QXmppLogger::MessageType type, const QString &text) const
{
QCOMPARE(type, QXmppLogger::SentMessage);
@@ -293,7 +293,7 @@ void tst_QXmppUploadRequestManager::testSending()
QFETCH(qint64, fileSize);
QFETCH(QString, fileType);
- QXmppLogger* logger = new QXmppLogger();
+ QXmppLogger *logger = new QXmppLogger();
logger->setLoggingType(QXmppLogger::SignalLogging);
client.setLogger(logger);
diff --git a/tests/qxmppvcardmanager/tst_qxmppvcardmanager.cpp b/tests/qxmppvcardmanager/tst_qxmppvcardmanager.cpp
index 369be5fa..c49e9808 100644
--- a/tests/qxmppvcardmanager/tst_qxmppvcardmanager.cpp
+++ b/tests/qxmppvcardmanager/tst_qxmppvcardmanager.cpp
@@ -48,9 +48,9 @@ void tst_QXmppVCardManager::testHandleStanza_data()
auto iqFromFull = iq;
iqFromFull.setFrom("stpeter@jabber.org/roundabout");
- ROW(client-vcard-from-empty, iq, true);
- ROW(client-vcard-from-bare, iqFromBare, true);
- ROW(client-vcard-from-full, iqFromFull, false);
+ ROW(client - vcard - from - empty, iq, true);
+ ROW(client - vcard - from - bare, iqFromBare, true);
+ ROW(client - vcard - from - full, iqFromFull, false);
#undef ROW
}
diff --git a/tests/util.h b/tests/util.h
index 830f56dd..cfad6e1d 100644
--- a/tests/util.h
+++ b/tests/util.h
@@ -42,7 +42,7 @@ static QByteArray packetToXml(const T &packet)
template<class T>
static void parsePacket(T &packet, const QByteArray &xml)
{
- //qDebug() << "parsing" << xml;
+ // qDebug() << "parsing" << xml;
packet.parse(xmlToDom(xml));
}