#include "DefaultBtProgressInfoFile.h" #include #include #include "Option.h" #include "Util.h" #include "Exception.h" #ifdef ENABLE_BITTORRENT #include "MockBtContext.h" #include "MockPeerStorage.h" #include "BtRuntime.h" #endif // ENABLE_BITTORRENT #include "MockPieceStorage.h" #include "prefs.h" #include "SingleFileDownloadContext.h" #include "Piece.h" #include "FileEntry.h" 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 SharedHandle _btContext; SharedHandle _peerStorage; SharedHandle _btRuntime; #endif // ENABLE_BITTORRENT SharedHandle _pieceStorage; SharedHandle