2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Type clarification: size_t for length or size, uint64_t for file
	length, off_t for file offset.

	* src/PiecedSegment.cc
	* src/GrowSegment.h
	* src/DefaultBtRequestFactory.h
	* src/DefaultBtProgressInfoFile.cc
	* src/UnknownLengthPieceStorage.h
	* src/DefaultPieceStorage.cc
	* src/UnknownLengthPieceStorage.cc
	* src/DefaultBtInteractive.cc
	* src/GrowSegment.cc
	* src/BitfieldMan.h
	* src/DownloadCommand.cc
	* src/BtRequestFactory.h
	* src/PiecedSegment.h
	* src/DefaultPieceStorage.h
	* src/Piece.cc
	* src/DefaultBtRequestFactory.cc
	* src/PieceStorage.h
	* src/Segment.h
	* src/Piece.h
	* src/BitfieldMan.cc
	* src/Util.cc
	* test/DefaultBtProgressInfoFileTest.cc
	* test/DefaultPieceStorageTest.cc
	* test/MockPieceStorage.h
	* test/BtRequestMessageTest.cc
	* test/DefaultBtMessageDispatcherTest.cc
	* test/BitfieldManTest.cc
	* test/GrowSegmentTest.cc
	* test/PieceTest.cc
	* test/SegmentTest.cc
	* test/SegmentManTest.cc
	* test/DefaultBtRequestFactoryTest.cc
	* test/MockBtRequestFactory.h
This commit is contained in:
Tatsuhiro Tsujikawa 2008-03-08 08:04:28 +00:00
parent aa669e8646
commit 518a200d57
34 changed files with 976 additions and 782 deletions

View file

@ -27,7 +27,7 @@ void GrowSegmentTest::testUpdateWrittenLength()
GrowSegment segment(new Piece());
segment.updateWrittenLength(32*1024);
CPPUNIT_ASSERT_EQUAL((int64_t)32*1024, segment.getPositionToWrite());
CPPUNIT_ASSERT_EQUAL((off_t)32*1024, segment.getPositionToWrite());
CPPUNIT_ASSERT(!segment.complete());
CPPUNIT_ASSERT(segment.getPiece()->pieceComplete());
}
@ -36,9 +36,9 @@ void GrowSegmentTest::testClear()
{
GrowSegment segment(new Piece());
segment.updateWrittenLength(32*1024);
CPPUNIT_ASSERT_EQUAL((int32_t)32*1024, segment.getWrittenLength());
CPPUNIT_ASSERT_EQUAL((size_t)32*1024, segment.getWrittenLength());
segment.clear();
CPPUNIT_ASSERT_EQUAL((int32_t)0, segment.getWrittenLength());
CPPUNIT_ASSERT_EQUAL((size_t)0, segment.getWrittenLength());
}
} // namespace aria2