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

@ -83,15 +83,15 @@ void SegmentManTest::testSaveAndLoad() {
void SegmentManTest::testNullBitfield() {
SegmentMan segmentMan;
Option op;
op.put(PREF_SEGMENT_SIZE, Util::itos(1024*1024));
op.put(PREF_SEGMENT_SIZE, Util::itos((int32_t)(1024*1024)));
segmentMan.option = &op;
SegmentHandle segment = segmentMan.getSegment(1);
CPPUNIT_ASSERT(!segment.isNull());
CPPUNIT_ASSERT_EQUAL(0, segment->index);
CPPUNIT_ASSERT_EQUAL(0, segment->length);
CPPUNIT_ASSERT_EQUAL(0, segment->segmentLength);
CPPUNIT_ASSERT_EQUAL(0, segment->writtenLength);
CPPUNIT_ASSERT_EQUAL((int32_t)0, segment->index);
CPPUNIT_ASSERT_EQUAL((int32_t)0, segment->length);
CPPUNIT_ASSERT_EQUAL((int32_t)0, segment->segmentLength);
CPPUNIT_ASSERT_EQUAL((int32_t)0, segment->writtenLength);
SegmentHandle segment2 = segmentMan.getSegment(2);
CPPUNIT_ASSERT(segment2.isNull());
@ -145,8 +145,8 @@ void SegmentManTest::testMarkPieceDone_usedSegment()
SegmentHandle segment = segmentMan.getSegment(0, 5);
CPPUNIT_ASSERT(!segment.isNull());
CPPUNIT_ASSERT_EQUAL(5, segment->index);
CPPUNIT_ASSERT_EQUAL((int32_t)5, segment->index);
CPPUNIT_ASSERT_EQUAL(pieceLength, (int32_t) segment->length);
CPPUNIT_ASSERT_EQUAL(pieceLength, (int32_t) segment->segmentLength);
CPPUNIT_ASSERT_EQUAL(100, segment->writtenLength);
CPPUNIT_ASSERT_EQUAL((int32_t)100, segment->writtenLength);
}