From 5d8e309f46a825fa254bda56fae743ff80cbfe2a Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Fri, 31 Jul 2015 13:11:36 +0200 Subject: fix reading/writing phone numbers in vCard (closes #65) The phone numbers were incorrectly read from / written to vCard as a "PHONE" element instead of "TEL". --- tests/qxmppvcardiq/tst_qxmppvcardiq.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'tests') diff --git a/tests/qxmppvcardiq/tst_qxmppvcardiq.cpp b/tests/qxmppvcardiq/tst_qxmppvcardiq.cpp index 5d12c1d1..c070c3be 100644 --- a/tests/qxmppvcardiq/tst_qxmppvcardiq.cpp +++ b/tests/qxmppvcardiq/tst_qxmppvcardiq.cpp @@ -124,20 +124,20 @@ void tst_QXmppVCardIq::testPhone_data() QTest::addColumn("xml"); QTest::addColumn("type"); - QTest::newRow("none") << QByteArray("12345") << int(QXmppVCardPhone::None); - QTest::newRow("HOME") << QByteArray("12345") << int(QXmppVCardPhone::Home); - QTest::newRow("WORK") << QByteArray("12345") << int(QXmppVCardPhone::Work); - QTest::newRow("VOICE") << QByteArray("12345") << int(QXmppVCardPhone::Voice); - QTest::newRow("FAX") << QByteArray("12345") << int(QXmppVCardPhone::Fax); - QTest::newRow("PAGER") << QByteArray("12345") << int(QXmppVCardPhone::Pager); - QTest::newRow("MSG") << QByteArray("12345") << int(QXmppVCardPhone::Messaging); - QTest::newRow("CELL") << QByteArray("12345") << int(QXmppVCardPhone::Cell); - QTest::newRow("VIDEO") << QByteArray("") << int(QXmppVCardPhone::Video); - QTest::newRow("BBS") << QByteArray("12345") << int(QXmppVCardPhone::BBS); - QTest::newRow("MODEM") << QByteArray("12345") << int(QXmppVCardPhone::Modem); - QTest::newRow("IDSN") << QByteArray("12345") << int(QXmppVCardPhone::ISDN); - QTest::newRow("PCS") << QByteArray("12345") << int(QXmppVCardPhone::PCS); - QTest::newRow("PREF") << QByteArray("12345") << int(QXmppVCardPhone::Preferred); + QTest::newRow("none") << QByteArray("12345") << int(QXmppVCardPhone::None); + QTest::newRow("HOME") << QByteArray("12345") << int(QXmppVCardPhone::Home); + QTest::newRow("WORK") << QByteArray("12345") << int(QXmppVCardPhone::Work); + QTest::newRow("VOICE") << QByteArray("12345") << int(QXmppVCardPhone::Voice); + QTest::newRow("FAX") << QByteArray("12345") << int(QXmppVCardPhone::Fax); + QTest::newRow("PAGER") << QByteArray("12345") << int(QXmppVCardPhone::Pager); + QTest::newRow("MSG") << QByteArray("12345") << int(QXmppVCardPhone::Messaging); + QTest::newRow("CELL") << QByteArray("12345") << int(QXmppVCardPhone::Cell); + QTest::newRow("VIDEO") << QByteArray("") << int(QXmppVCardPhone::Video); + QTest::newRow("BBS") << QByteArray("12345") << int(QXmppVCardPhone::BBS); + QTest::newRow("MODEM") << QByteArray("12345") << int(QXmppVCardPhone::Modem); + QTest::newRow("IDSN") << QByteArray("12345") << int(QXmppVCardPhone::ISDN); + QTest::newRow("PCS") << QByteArray("12345") << int(QXmppVCardPhone::PCS); + QTest::newRow("PREF") << QByteArray("12345") << int(QXmppVCardPhone::Preferred); } void tst_QXmppVCardIq::testPhone() @@ -165,8 +165,8 @@ void tst_QXmppVCardIq::testVCard() "Foo Bar!" "FooBar" "FooWizBaz" - "12345" - "67890" + "12345" + "67890" "" "image/png" "" -- cgit v1.2.3