summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-05-18 16:22:06 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-05-18 16:50:18 (GMT)
commit8472194d716e0e3b95a66bf5be45c246ee79d0af (patch)
treeb9f473e0e606b012ee5013e85d2cf5e7523b7029 /Swiften/Compress/UnitTest/ZLibCompressorTest.cpp
parentb1b3b8f88517ad8b14795cc8a6265962d2935be3 (diff)
downloadswift-8472194d716e0e3b95a66bf5be45c246ee79d0af.zip
swift-8472194d716e0e3b95a66bf5be45c246ee79d0af.tar.bz2
Propagate use of SafeByteArray down to the connection.
Diffstat (limited to 'Swiften/Compress/UnitTest/ZLibCompressorTest.cpp')
-rw-r--r--Swiften/Compress/UnitTest/ZLibCompressorTest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Swiften/Compress/UnitTest/ZLibCompressorTest.cpp b/Swiften/Compress/UnitTest/ZLibCompressorTest.cpp
index 9320ae1..3f22690 100644
--- a/Swiften/Compress/UnitTest/ZLibCompressorTest.cpp
+++ b/Swiften/Compress/UnitTest/ZLibCompressorTest.cpp
@@ -4,7 +4,7 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#include <Swiften/Base/ByteArray.h>
+#include <Swiften/Base/SafeByteArray.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -27,17 +27,17 @@ class ZLibCompressorTest : public CppUnit::TestFixture
void testProcess() {
ZLibCompressor testling;
- ByteArray result = testling.process(createByteArray("foo"));
+ SafeByteArray result = testling.process(createSafeByteArray("foo"));
- CPPUNIT_ASSERT_EQUAL(createByteArray("\x78\xda\x4a\xcb\xcf\x07\x00\x00\x00\xff\xff", 11), result);
+ CPPUNIT_ASSERT_EQUAL(createSafeByteArray("\x78\xda\x4a\xcb\xcf\x07\x00\x00\x00\xff\xff", 11), result);
}
void testProcess_Twice() {
ZLibCompressor testling;
- testling.process(createByteArray("foo"));
- ByteArray result = testling.process(createByteArray("bar"));
+ testling.process(createSafeByteArray("foo"));
+ SafeByteArray result = testling.process(createSafeByteArray("bar"));
- CPPUNIT_ASSERT_EQUAL(createByteArray("\x4a\x4a\x2c\x02\x00\x00\x00\xff\xff",9), result);
+ CPPUNIT_ASSERT_EQUAL(createSafeByteArray("\x4a\x4a\x2c\x02\x00\x00\x00\xff\xff",9), result);
}
};