2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Changed method signature:
	PieceStorage::getInFlightPieces
	* src/DefaultBtProgressInfoFile.cc
	* src/DefaultPieceStorage.cc
	* src/DefaultPieceStorage.h
	* src/PieceStorage.h
	* src/UnknownLengthPieceStorage.cc
	* src/UnknownLengthPieceStorage.h
	* test/DefaultBtProgressInfoFileTest.cc
	* test/MockPieceStorage.h
This commit is contained in:
Tatsuhiro Tsujikawa 2008-05-11 14:42:34 +00:00
parent b96eb7fd79
commit d2110dc697
9 changed files with 30 additions and 14 deletions

View file

@ -114,7 +114,9 @@ void DefaultBtProgressInfoFileTest::testLoad()
_pieceStorage->countInFlightPiece());
// piece index 1
std::deque<SharedHandle<Piece> > inFlightPieces = _pieceStorage->getInFlightPieces();
std::deque<SharedHandle<Piece> > inFlightPieces;
_pieceStorage->getInFlightPieces(inFlightPieces);
SharedHandle<Piece> piece1 = inFlightPieces[0];
CPPUNIT_ASSERT_EQUAL((size_t)1, piece1->getIndex());
CPPUNIT_ASSERT_EQUAL((size_t)1024, piece1->getLength());
@ -150,7 +152,9 @@ void DefaultBtProgressInfoFileTest::testLoad_nonBt()
_pieceStorage->countInFlightPiece());
// piece index 1
std::deque<SharedHandle<Piece> > inFlightPieces = _pieceStorage->getInFlightPieces();
std::deque<SharedHandle<Piece> > inFlightPieces;
_pieceStorage->getInFlightPieces(inFlightPieces);
SharedHandle<Piece> piece1 = inFlightPieces[0];
CPPUNIT_ASSERT_EQUAL((size_t)1, piece1->getIndex());
CPPUNIT_ASSERT_EQUAL((size_t)1024, piece1->getLength());