From 048a2cf59737f761876e81a77e8d064c45c752d7 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 11 Oct 2007 16:58:24 +0000 Subject: 2007-10-12 Tatsuhiro Tsujikawa Implemented BitTorrent/http/ftp integrated download. I've rewritten lots of files and now some headers have forward class declarations to reduce compile time. The implementation is extremely alpha stage, I recommend to use this for testing purpose only. --- test/ByteArrayDiskWriterTest.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/ByteArrayDiskWriterTest.cc') diff --git a/test/ByteArrayDiskWriterTest.cc b/test/ByteArrayDiskWriterTest.cc index ff90db61..18ea5e0d 100644 --- a/test/ByteArrayDiskWriterTest.cc +++ b/test/ByteArrayDiskWriterTest.cc @@ -27,10 +27,10 @@ void ByteArrayDiskWriterTest::testWriteAndRead() { ByteArrayDiskWriter bw; string msg1 = "Hello world!"; - bw.writeData(msg1.c_str(), msg1.size(), 0); + bw.writeData((const unsigned char*)msg1.c_str(), msg1.size(), 0); char buf[100]; - int32_t c = bw.readData(buf, sizeof(buf), 0); + int32_t c = bw.readData((unsigned char*)buf, sizeof(buf), 0); buf[c] = '\0'; CPPUNIT_ASSERT_EQUAL(msg1, string(buf)); @@ -38,7 +38,7 @@ void ByteArrayDiskWriterTest::testWriteAndRead() { // second call memset(buf, '\0', sizeof(buf)); - c = bw.readData(buf, sizeof(buf), 0); + c = bw.readData((unsigned char*)buf, sizeof(buf), 0); buf[c] = '\0'; CPPUNIT_ASSERT_EQUAL(msg1, string(buf)); @@ -48,10 +48,10 @@ void ByteArrayDiskWriterTest::testWriteAndRead2() { ByteArrayDiskWriter bw; string msg1 = "Hello world!"; - bw.writeData(msg1.c_str(), msg1.size(), 16); + bw.writeData((const unsigned char*)msg1.c_str(), msg1.size(), 16); char buf[100]; - int32_t c = bw.readData(buf, sizeof(buf), 16); + int32_t c = bw.readData((unsigned char*)buf, sizeof(buf), 16); buf[c] = '\0'; CPPUNIT_ASSERT_EQUAL(msg1, string(buf)); @@ -59,7 +59,7 @@ void ByteArrayDiskWriterTest::testWriteAndRead2() { // second call memset(buf, '\0', sizeof(buf)); - c = bw.readData(buf, sizeof(buf), 16); + c = bw.readData((unsigned char*)buf, sizeof(buf), 16); buf[c] = '\0'; CPPUNIT_ASSERT_EQUAL(msg1, string(buf)); -- cgit