summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-05-03 20:39:27 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-05-05 19:43:14 (GMT)
commit772b2ec0243d7b55d91e4027d828881d18093ed0 (patch)
tree83a58b2b97f3992165ee20c05e0630452eb50457 /Swiften/Base/UnitTest
parent0b3db8fd68abee7269d5a38aabd8a816e099eae5 (diff)
downloadswift-contrib-772b2ec0243d7b55d91e4027d828881d18093ed0.zip
swift-contrib-772b2ec0243d7b55d91e4027d828881d18093ed0.tar.bz2
Replace ByteArray by typedef.
Diffstat (limited to 'Swiften/Base/UnitTest')
-rw-r--r--Swiften/Base/UnitTest/ByteArrayTest.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/Swiften/Base/UnitTest/ByteArrayTest.cpp b/Swiften/Base/UnitTest/ByteArrayTest.cpp
index b663166..ecd0439 100644
--- a/Swiften/Base/UnitTest/ByteArrayTest.cpp
+++ b/Swiften/Base/UnitTest/ByteArrayTest.cpp
@@ -25,31 +25,31 @@ class ByteArrayTest : public CppUnit::TestFixture {
void testGetData_NoData() {
ByteArray testling;
- CPPUNIT_ASSERT_EQUAL(reinterpret_cast<const char*>(NULL), reinterpret_cast<const char*>(testling.getData()));
+ CPPUNIT_ASSERT_EQUAL(reinterpret_cast<const char*>(NULL), reinterpret_cast<const char*>(vecptr(testling)));
}
void testToString() {
- ByteArray testling(ByteArray::create("abcde"));
+ ByteArray testling(createByteArray("abcde"));
- CPPUNIT_ASSERT_EQUAL(std::string("abcde"), testling.toString());
+ CPPUNIT_ASSERT_EQUAL(std::string("abcde"), byteArrayToString(testling));
}
void testToString_NullTerminated() {
- ByteArray testling(ByteArray::create("abcde\0", 6));
+ ByteArray testling(createByteArray("abcde\0", 6));
- CPPUNIT_ASSERT_EQUAL(std::string("abcde"), testling.toString());
+ CPPUNIT_ASSERT_EQUAL(std::string("abcde"), byteArrayToString(testling));
}
void testToString_TwoNullTerminated() {
- ByteArray testling(ByteArray::create("abcde\0\0", 7));
+ ByteArray testling(createByteArray("abcde\0\0", 7));
- CPPUNIT_ASSERT_EQUAL(std::string("abcde"), testling.toString());
+ CPPUNIT_ASSERT_EQUAL(std::string("abcde"), byteArrayToString(testling));
}
void testToString_AllNull() {
- ByteArray testling(ByteArray::create("\0\0", 2));
+ ByteArray testling(createByteArray("\0\0", 2));
- CPPUNIT_ASSERT_EQUAL(std::string(""), testling.toString());
+ CPPUNIT_ASSERT_EQUAL(std::string(""), byteArrayToString(testling));
}
};