#include "DefaultPieceStorage.h" #include #include "util.h" #include "Exception.h" #include "Piece.h" #include "Peer.h" #include "Option.h" #include "FileEntry.h" #include "RarestPieceSelector.h" #include "InorderPieceSelector.h" #include "DownloadContext.h" #include "bittorrent_helper.h" #include "DiskAdaptor.h" #include "DiskWriterFactory.h" #include "PieceStatMan.h" #include "prefs.h" namespace aria2 { class DefaultPieceStorageTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(DefaultPieceStorageTest); CPPUNIT_TEST(testGetTotalLength); CPPUNIT_TEST(testGetMissingPiece); CPPUNIT_TEST(testGetMissingPiece_many); CPPUNIT_TEST(testGetMissingPiece_excludedIndexes); CPPUNIT_TEST(testGetMissingPiece_manyWithExcludedIndexes); CPPUNIT_TEST(testGetMissingFastPiece); CPPUNIT_TEST(testGetMissingFastPiece_excludedIndexes); CPPUNIT_TEST(testHasMissingPiece); CPPUNIT_TEST(testCompletePiece); CPPUNIT_TEST(testGetPiece); CPPUNIT_TEST(testGetPieceInUsedPieces); CPPUNIT_TEST(testGetPieceCompletedPiece); CPPUNIT_TEST(testCancelPiece); CPPUNIT_TEST(testMarkPiecesDone); CPPUNIT_TEST(testGetCompletedLength); CPPUNIT_TEST(testGetFilteredCompletedLength); CPPUNIT_TEST(testGetNextUsedIndex); CPPUNIT_TEST_SUITE_END(); private: std::shared_ptr dctx_; std::shared_ptr peer; std::shared_ptr