diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-05-03 20:39:27 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-05-05 19:43:14 (GMT) |
commit | 772b2ec0243d7b55d91e4027d828881d18093ed0 (patch) | |
tree | 83a58b2b97f3992165ee20c05e0630452eb50457 /Swiften/LinkLocal/UnitTest | |
parent | 0b3db8fd68abee7269d5a38aabd8a816e099eae5 (diff) | |
download | swift-contrib-772b2ec0243d7b55d91e4027d828881d18093ed0.zip swift-contrib-772b2ec0243d7b55d91e4027d828881d18093ed0.tar.bz2 |
Replace ByteArray by typedef.
Diffstat (limited to 'Swiften/LinkLocal/UnitTest')
-rw-r--r-- | Swiften/LinkLocal/UnitTest/LinkLocalServiceInfoTest.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/LinkLocal/UnitTest/LinkLocalServiceInfoTest.cpp b/Swiften/LinkLocal/UnitTest/LinkLocalServiceInfoTest.cpp index 1e69cd0..bce7331 100644 --- a/Swiften/LinkLocal/UnitTest/LinkLocalServiceInfoTest.cpp +++ b/Swiften/LinkLocal/UnitTest/LinkLocalServiceInfoTest.cpp @@ -9,6 +9,7 @@ #include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/TestFactoryRegistry.h> +#include <QA/Checker/IO.h> #include <Swiften/LinkLocal/LinkLocalServiceInfo.h> using namespace Swift; @@ -28,11 +29,11 @@ class LinkLocalServiceInfoTest : public CppUnit::TestFixture { info.setLastName("Tron\xc3\xe7on"); info.setStatus(LinkLocalServiceInfo::Away); - CPPUNIT_ASSERT_EQUAL(ByteArray("\x09txtvers=1\x09" + std::string("1st=Remko\x0dlast=Tron\xc3\xe7on\x0bstatus=away")), info.toTXTRecord()); + CPPUNIT_ASSERT_EQUAL(createByteArray("\x09txtvers=1\x09" + std::string("1st=Remko\x0dlast=Tron\xc3\xe7on\x0bstatus=away")), info.toTXTRecord()); } void testCreateFromTXTRecord() { - LinkLocalServiceInfo info = LinkLocalServiceInfo::createFromTXTRecord(ByteArray("\x09txtvers=1\x09" + std::string("1st=Remko\x0dlast=Tron\xc3\xe7on\x0bstatus=away"))); + LinkLocalServiceInfo info = LinkLocalServiceInfo::createFromTXTRecord(createByteArray("\x09txtvers=1\x09" + std::string("1st=Remko\x0dlast=Tron\xc3\xe7on\x0bstatus=away"))); CPPUNIT_ASSERT_EQUAL(std::string("Remko"), info.getFirstName()); CPPUNIT_ASSERT_EQUAL(std::string("Tron\xc3\xe7on"), info.getLastName()); @@ -40,7 +41,7 @@ class LinkLocalServiceInfoTest : public CppUnit::TestFixture { } void testCreateFromTXTRecord_InvalidSize() { - LinkLocalServiceInfo info = LinkLocalServiceInfo::createFromTXTRecord(ByteArray("\x10last=a")); + LinkLocalServiceInfo info = LinkLocalServiceInfo::createFromTXTRecord(createByteArray("\x10last=a")); CPPUNIT_ASSERT_EQUAL(std::string("a"), info.getLastName()); } |