diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-10-11 16:58:24 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-10-11 16:58:24 +0000 |
| commit | 048a2cf59737f761876e81a77e8d064c45c752d7 (patch) | |
| tree | 65c9d5498aafe6a8c8e640ddfcc43c7013504d0d /test/ByteArrayDiskWriterTest.cc | |
| parent | e26bbbb9eee140ba24402fe872a752b42f0077de (diff) | |
2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
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.
Diffstat (limited to 'test/ByteArrayDiskWriterTest.cc')
| -rw-r--r-- | test/ByteArrayDiskWriterTest.cc | 12 |
1 files changed, 6 insertions, 6 deletions
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)); |
