2007-08-10 Ross Smith II <aria2spam at smithii dot com>

gcc 3.4.4 support:
	* src/DefaultBtContext.cc: int32_t -> int
	* src/main.cc: int -> int32_t, int32_t -> int
	* src/messageDigest.h: uint32_t -> unsigned int
	* src/NameResolver.h: int32_t -> int
	* src/PeerConnection.cc: int -> int32_t
	* src/SpeedCalc.cc: int32_t -> int
	* src/TrackerUpdateCommand.h: int -> int32_t
	* src/Util.cc: int32_t -> int
	* src/Util.h: int32_t -> int
	* src/Xml2MetalinkProcessor.cc: int -> uint32_t, int64_t -> 
uint64_t
	* test/AnnounceListTest.cc: int -> int32_t
	* test/ChunkedEncodingTest.cc: int -> int32_t
	* test/DataTest.cc: int -> int32_t
	* test/DefaultBtRequestFactoryTest.cc: int -> int32_t
	* test/DefaultPeerListProcessorTest.cc: int -> int32_t
	* test/DefaultPieceStorageTest.cc: int -> int32_t
	* test/FeatureConfigTest.cc: int -> int32_t
	* test/MetalinkEntryTest.cc: int -> int32_t
	* test/MockBtRequestFactory.h: int -> int32_t
	* test/MockPieceStorage.h: int -> int32_t
	* test/OptionTest.cc: int -> int32_t
	* test/RequestTest.cc: int -> int32_t
	* test/SegmentManTest.cc: int -> int32_t
	* test/Xml2MetalinkProcessorTest.cc: int -> int32_t
This commit is contained in:
Tatsuhiro Tsujikawa 2007-08-15 15:11:01 +00:00
parent 6aa98f9b9f
commit 3cc1ed5e09
25 changed files with 120 additions and 92 deletions

View file

@ -125,8 +125,8 @@ void DefaultPieceStorageTest::testGetPiece() {
DefaultPieceStorage pss(btContext, option);
PieceHandle pieceGot = pss.getPiece(0);
CPPUNIT_ASSERT_EQUAL(0, pieceGot->getIndex());
CPPUNIT_ASSERT_EQUAL(128, pieceGot->getLength());
CPPUNIT_ASSERT_EQUAL((int32_t)0, pieceGot->getIndex());
CPPUNIT_ASSERT_EQUAL((int32_t)128, pieceGot->getLength());
CPPUNIT_ASSERT_EQUAL(false, pieceGot->pieceComplete());
}
@ -136,9 +136,9 @@ void DefaultPieceStorageTest::testGetPieceInUsedPieces() {
piece->completeBlock(0);
pss.addUsedPiece(piece);
PieceHandle pieceGot = pss.getPiece(0);
CPPUNIT_ASSERT_EQUAL(0, pieceGot->getIndex());
CPPUNIT_ASSERT_EQUAL(128, pieceGot->getLength());
CPPUNIT_ASSERT_EQUAL(1, pieceGot->countCompleteBlock());
CPPUNIT_ASSERT_EQUAL((int32_t)0, pieceGot->getIndex());
CPPUNIT_ASSERT_EQUAL((int32_t)128, pieceGot->getLength());
CPPUNIT_ASSERT_EQUAL((int32_t)1, pieceGot->countCompleteBlock());
}
void DefaultPieceStorageTest::testGetPieceCompletedPiece() {
@ -146,7 +146,7 @@ void DefaultPieceStorageTest::testGetPieceCompletedPiece() {
PieceHandle piece = PieceHandle(new Piece(0, 128));
pss.completePiece(piece);
PieceHandle pieceGot = pss.getPiece(0);
CPPUNIT_ASSERT_EQUAL(0, pieceGot->getIndex());
CPPUNIT_ASSERT_EQUAL(128, pieceGot->getLength());
CPPUNIT_ASSERT_EQUAL((int32_t)0, pieceGot->getIndex());
CPPUNIT_ASSERT_EQUAL((int32_t)128, pieceGot->getLength());
CPPUNIT_ASSERT_EQUAL(true, pieceGot->pieceComplete());
}