2008-11-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Rewritten ByteArrayDiskWriter::size() using seekg() and tellg().
	Removed const qualifier from DiskWriter::size().
	* src/AbstractDiskWriter.cc
	* src/AbstractDiskWriter.h
	* src/ByteArrayDiskWriter.cc
	* src/ByteArrayDiskWriter.h
	* src/DiskWriter.h
	* test/ByteArrayDiskWriterTest.cc
This commit is contained in:
Tatsuhiro Tsujikawa 2008-11-17 12:07:24 +00:00
parent 644f707519
commit b0029fa4bf
7 changed files with 28 additions and 10 deletions

View file

@ -43,6 +43,7 @@ void ByteArrayDiskWriterTest::testWriteAndRead() {
buf[c] = '\0';
CPPUNIT_ASSERT_EQUAL(std::string("ello World !!"), std::string(buf));
CPPUNIT_ASSERT_EQUAL((uint64_t)14, bw.size());
}
void ByteArrayDiskWriterTest::testWriteAndRead2() {
@ -58,6 +59,7 @@ void ByteArrayDiskWriterTest::testWriteAndRead2() {
buf[c] = '\0';
CPPUNIT_ASSERT_EQUAL(std::string("Hello From Mars"), std::string(buf));
CPPUNIT_ASSERT_EQUAL((uint64_t)15, bw.size());
}
} // namespace aria2