#include "DefaultBtProgressInfoFile.h" #include #include #include "Option.h" #include "util.h" #include "Exception.h" #include "MockPieceStorage.h" #include "prefs.h" #include "DownloadContext.h" #include "Piece.h" #include "FileEntry.h" #include "array_fun.h" #ifdef ENABLE_BITTORRENT # include "MockPeerStorage.h" # include "BtRuntime.h" # include "bittorrent_helper.h" #endif // ENABLE_BITTORRENT namespace aria2 { class DefaultBtProgressInfoFileTest:public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(DefaultBtProgressInfoFileTest); #ifdef ENABLE_BITTORRENT CPPUNIT_TEST(testSave); CPPUNIT_TEST(testLoad); #ifndef WORDS_BIGENDIAN CPPUNIT_TEST(testLoad_compat); #endif // !WORDS_BIGENDIAN #endif // ENABLE_BITTORRENT CPPUNIT_TEST(testSave_nonBt); CPPUNIT_TEST(testLoad_nonBt); #ifndef WORDS_BIGENDIAN CPPUNIT_TEST(testLoad_nonBt_compat); #endif // !WORDS_BIGENDIAN CPPUNIT_TEST(testLoad_nonBt_pieceLengthShorter); CPPUNIT_TEST(testUpdateFilename); CPPUNIT_TEST_SUITE_END(); private: #ifdef ENABLE_BITTORRENT std::shared_ptr dctx_; std::shared_ptr peerStorage_; std::shared_ptr btRuntime_; #endif // ENABLE_BITTORRENT std::shared_ptr pieceStorage_; std::shared_ptr