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

type cleanup for allmost all remaining files.
This commit is contained in:
Tatsuhiro Tsujikawa 2008-03-09 12:24:01 +00:00
parent ca3f6e57f3
commit 032c7c2808
278 changed files with 1489 additions and 1517 deletions

View file

@ -50,14 +50,14 @@ public:
class MockBtMessageFactory2 : public MockBtMessageFactory {
public:
virtual SharedHandle<BtMessage>
createRequestMessage(const SharedHandle<Piece>& piece, int32_t blockIndex) {
createRequestMessage(const SharedHandle<Piece>& piece, size_t blockIndex) {
return new MockBtRequestMessage(piece->getIndex(), blockIndex);
}
};
class MockBtMessageDispatcher2 : public MockBtMessageDispatcher {
public:
virtual bool isOutstandingRequest(int32_t index, int32_t blockIndex) {
virtual bool isOutstandingRequest(size_t index, size_t blockIndex) {
return index == 0 && blockIndex == 0;
}
};
@ -114,7 +114,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION(DefaultBtRequestFactoryTest);
void DefaultBtRequestFactoryTest::testAddTargetPiece() {
SharedHandle<Piece> piece = new Piece(0, 16*1024);
btRequestFactory->addTargetPiece(piece);
CPPUNIT_ASSERT_EQUAL((int32_t)1, btRequestFactory->countTargetPiece());
CPPUNIT_ASSERT_EQUAL((size_t)1, btRequestFactory->countTargetPiece());
}
void DefaultBtRequestFactoryTest::testRemoveCompletedPiece() {
@ -123,9 +123,9 @@ void DefaultBtRequestFactoryTest::testRemoveCompletedPiece() {
piece2->setAllBlock();
btRequestFactory->addTargetPiece(piece1);
btRequestFactory->addTargetPiece(piece2);
CPPUNIT_ASSERT_EQUAL((int32_t)2, btRequestFactory->countTargetPiece());
CPPUNIT_ASSERT_EQUAL((size_t)2, btRequestFactory->countTargetPiece());
btRequestFactory->removeCompletedPiece();
CPPUNIT_ASSERT_EQUAL((int32_t)1, btRequestFactory->countTargetPiece());
CPPUNIT_ASSERT_EQUAL((size_t)1, btRequestFactory->countTargetPiece());
CPPUNIT_ASSERT_EQUAL((size_t)0, btRequestFactory->getTargetPieces().front()->getIndex());
}