From 1268a64bdd1320639cad0d9c8331fb6fd682b30c Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Fri, 3 Aug 2012 16:00:00 +0200 Subject: add stub for addresses --- tests/vcard.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests/vcard.cpp') diff --git a/tests/vcard.cpp b/tests/vcard.cpp index b92b269b..ccc65199 100644 --- a/tests/vcard.cpp +++ b/tests/vcard.cpp @@ -26,6 +26,26 @@ #include "tests.h" #include "vcard.h" +void tst_QXmppVCardIq::testAddress_data() +{ + QTest::addColumn("xml"); + QTest::addColumn("type"); + + QTest::newRow("none") << QByteArray("") << int(QXmppVCardAddress::None); + QTest::newRow("HOME") << QByteArray("") << int(QXmppVCardAddress::Home); +} + +void tst_QXmppVCardIq::testAddress() +{ + QFETCH(QByteArray, xml); + QFETCH(int, type); + + QXmppVCardAddress address; + parsePacket(address, xml); + QCOMPARE(int(address.type()), type); + serializePacket(address, xml); +} + void tst_QXmppVCardIq::testEmail_data() { QTest::addColumn("xml"); -- cgit v1.2.3