aboutsummaryrefslogtreecommitdiff
path: root/tests/qxmppmixitem
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qxmppmixitem')
-rw-r--r--tests/qxmppmixitem/tst_qxmppmixitem.cpp62
1 files changed, 28 insertions, 34 deletions
diff --git a/tests/qxmppmixitem/tst_qxmppmixitem.cpp b/tests/qxmppmixitem/tst_qxmppmixitem.cpp
index 2120aa74..bfb4004e 100644
--- a/tests/qxmppmixitem/tst_qxmppmixitem.cpp
+++ b/tests/qxmppmixitem/tst_qxmppmixitem.cpp
@@ -43,22 +43,21 @@ void tst_QXmppMixItem::testInfo()
{
const QByteArray xml(
"<x xmlns=\"jabber:x:data\" type=\"result\">"
- "<field type=\"hidden\" var=\"FORM_TYPE\">"
- "<value>urn:xmpp:mix:core:1</value>"
- "</field>"
- "<field type=\"text-single\" var=\"Name\">"
- "<value>Witches Coven</value>"
- "</field>"
- "<field type=\"text-single\" var=\"Description\">"
- "<value>A location not far from the blasted heath where the "
- "three witches meet</value>"
- "</field>"
- "<field type=\"jid-multi\" var=\"Contact\">"
- "<value>greymalkin@shakespeare.example</value>"
- "<value>joan@shakespeare.example</value>"
- "</field>"
- "</x>"
- );
+ "<field type=\"hidden\" var=\"FORM_TYPE\">"
+ "<value>urn:xmpp:mix:core:1</value>"
+ "</field>"
+ "<field type=\"text-single\" var=\"Name\">"
+ "<value>Witches Coven</value>"
+ "</field>"
+ "<field type=\"text-single\" var=\"Description\">"
+ "<value>A location not far from the blasted heath where the "
+ "three witches meet</value>"
+ "</field>"
+ "<field type=\"jid-multi\" var=\"Contact\">"
+ "<value>greymalkin@shakespeare.example</value>"
+ "<value>joan@shakespeare.example</value>"
+ "</field>"
+ "</x>");
QXmppMixInfoItem item;
parsePacket(item, xml);
@@ -88,22 +87,20 @@ void tst_QXmppMixItem::testIsInfoItem()
const QByteArray xmlCorrect(
"<x xmlns=\"jabber:x:data\" type=\"result\">"
- "<field type=\"hidden\" var=\"FORM_TYPE\">"
- "<value>urn:xmpp:mix:core:1</value>"
- "</field>"
- "</x>"
- );
+ "<field type=\"hidden\" var=\"FORM_TYPE\">"
+ "<value>urn:xmpp:mix:core:1</value>"
+ "</field>"
+ "</x>");
QCOMPARE(doc.setContent(xmlCorrect, true), true);
element = doc.documentElement();
QVERIFY(QXmppMixInfoItem::isMixChannelInfo(element));
const QByteArray xmlWrong(
"<x xmlns=\"jabber:x:data\" type=\"result\">"
- "<field type=\"hidden\" var=\"FORM_TYPE\">"
- "<value>other:namespace</value>"
- "</field>"
- "</x>"
- );
+ "<field type=\"hidden\" var=\"FORM_TYPE\">"
+ "<value>other:namespace</value>"
+ "</field>"
+ "</x>");
QCOMPARE(doc.setContent(xmlWrong, true), true);
element = doc.documentElement();
QVERIFY(!QXmppMixInfoItem::isMixChannelInfo(element));
@@ -113,10 +110,9 @@ void tst_QXmppMixItem::testParticipant()
{
const QByteArray xml(
"<participant xmlns=\"urn:xmpp:mix:core:1\">"
- "<jid>hag66@shakespeare.example</jid>"
- "<nick>thirdwitch</nick>"
- "</participant>"
- );
+ "<jid>hag66@shakespeare.example</jid>"
+ "<nick>thirdwitch</nick>"
+ "</participant>");
QXmppMixParticipantItem item;
parsePacket(item, xml);
@@ -141,16 +137,14 @@ void tst_QXmppMixItem::testIsParticipantItem()
const QByteArray xmlCorrect(
"<participant xmlns=\"urn:xmpp:mix:core:1\">"
- "</participant>"
- );
+ "</participant>");
QCOMPARE(doc.setContent(xmlCorrect, true), true);
element = doc.documentElement();
QVERIFY(QXmppMixParticipantItem::isMixParticipantItem(element));
const QByteArray xmlWrong(
"<participant xmlns=\"other:namespace:1\">"
- "</participant>"
- );
+ "</participant>");
QCOMPARE(doc.setContent(xmlWrong, true), true);
element = doc.documentElement();
QVERIFY(!QXmppMixParticipantItem::isMixParticipantItem(element));