Skip to content

Commit

Permalink
tests: pubsubmanager: Fix odr-violation
Browse files Browse the repository at this point in the history
  • Loading branch information
lnjX committed Feb 3, 2024
1 parent e62816a commit 3b58c9a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/qxmpppubsubmanager/tst_qxmpppubsubmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ using PSManager = QXmppPubSubManager;
using Affiliation = QXmppPubSubAffiliation;
using AffiliationType = QXmppPubSubAffiliation::Affiliation;

const char *ns_pubsub = "http://jabber.org/protocol/pubsub";
const char *ns_pubsub_auto_create = "http://jabber.org/protocol/pubsub#auto-create";
const char *XMLNS_PUBSUB = "http://jabber.org/protocol/pubsub";
const char *XMLNS_PUBSUB_AUTO_CREATE = "http://jabber.org/protocol/pubsub#auto-create";

class TestEventManager : public QXmppClientExtension, public QXmppPubSubEventHandler
{
Expand Down Expand Up @@ -148,7 +148,7 @@ void tst_QXmppPubSubManager::testRequestFeatures()
"</query></iq>"));

auto features = expectFutureVariant<QVector<QString>>(future);
QCOMPARE(features, (QVector<QString> { ns_pubsub, ns_pubsub_auto_create }));
QCOMPARE(features, (QVector<QString> { XMLNS_PUBSUB, XMLNS_PUBSUB_AUTO_CREATE }));

future = psManager->requestFeatures("[email protected]");
test.expect(QStringLiteral("<iq id='qxmpp1' to='[email protected]' type='get'>"
Expand All @@ -162,7 +162,7 @@ void tst_QXmppPubSubManager::testRequestFeatures()
"</query></iq>"));

features = expectFutureVariant<QVector<QString>>(future);
QCOMPARE(features, (QVector<QString> { ns_pubsub, ns_pubsub_auto_create }));
QCOMPARE(features, (QVector<QString> { XMLNS_PUBSUB, XMLNS_PUBSUB_AUTO_CREATE }));

future = psManager->requestFeatures("[email protected]", QXmppPubSubManager::PubSub);
test.expect(QStringLiteral("<iq id='qxmpp1' to='[email protected]' type='get'>"
Expand All @@ -189,7 +189,7 @@ void tst_QXmppPubSubManager::testRequestFeatures()
"</query></iq>"));

features = expectFutureVariant<QVector<QString>>(future);
QCOMPARE(features, (QVector<QString> { ns_pubsub, ns_pubsub_auto_create }));
QCOMPARE(features, (QVector<QString> { XMLNS_PUBSUB, XMLNS_PUBSUB_AUTO_CREATE }));

future = psManager->requestFeatures("pubsub.shakespeare.lit", QXmppPubSubManager::Pep);
test.expect(QStringLiteral("<iq id='qxmpp1' to='pubsub.shakespeare.lit' type='get'>"
Expand All @@ -216,7 +216,7 @@ void tst_QXmppPubSubManager::testRequestFeatures()
"</query></iq>"));

features = expectFutureVariant<QVector<QString>>(future);
QCOMPARE(features, (QVector<QString> { ns_pubsub, ns_pubsub_auto_create }));
QCOMPARE(features, (QVector<QString> { XMLNS_PUBSUB, XMLNS_PUBSUB_AUTO_CREATE }));
}

void tst_QXmppPubSubManager::testRequestPepFeatures()
Expand All @@ -236,7 +236,7 @@ void tst_QXmppPubSubManager::testRequestPepFeatures()
"</query></iq>"));

auto features = expectFutureVariant<QVector<QString>>(future);
QCOMPARE(features, (QVector<QString> { ns_pubsub, ns_pubsub_auto_create }));
QCOMPARE(features, (QVector<QString> { XMLNS_PUBSUB, XMLNS_PUBSUB_AUTO_CREATE }));
}

void tst_QXmppPubSubManager::testFetchNodes()
Expand Down

0 comments on commit 3b58c9a

Please sign in to comment.