#include "SessionSerializer.h" #include #include #include #include "TestUtil.h" #include "RequestGroupMan.h" #include "array_fun.h" #include "download_helper.h" #include "prefs.h" #include "Option.h" #include "a2functional.h" #include "FileEntry.h" #include "SelectEventPoll.h" #include "DownloadEngine.h" namespace aria2 { class SessionSerializerTest:public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(SessionSerializerTest); CPPUNIT_TEST(testSave); CPPUNIT_TEST(testSaveErrorDownload); CPPUNIT_TEST_SUITE_END(); public: void testSave(); void testSaveErrorDownload(); }; CPPUNIT_TEST_SUITE_REGISTRATION(SessionSerializerTest); void SessionSerializerTest::testSave() { #if defined(ENABLE_BITTORRENT) && defined(ENABLE_METALINK) std::vector uris { "http://localhost/file", "http://mirror/file", A2_TEST_DIR"/test.torrent", A2_TEST_DIR"/serialize_session.meta4", "magnet:?xt=urn:btih:248D0A1CD08284299DE78D5C1ED359BB46717D8C"}; std::vector > result; std::shared_ptr