#include "SessionSerializer.h" #include #include #include #include "RequestGroupMan.h" #include "ServerStatMan.h" #include "array_fun.h" #include "download_helper.h" #include "FileEntry.h" #include "prefs.h" namespace aria2 { class SessionSerializerTest:public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(SessionSerializerTest); CPPUNIT_TEST(testSave); CPPUNIT_TEST_SUITE_END(); public: void testSave(); }; CPPUNIT_TEST_SUITE_REGISTRATION(SessionSerializerTest); void SessionSerializerTest::testSave() { #if defined(ENABLE_BITTORRENT) && defined(ENABLE_METALINK) const std::string URIs[] = { "http://localhost/file", "http://mirror/file", "test.torrent", "serialize_session.meta4", "magnet:?xt=urn:btih:248D0A1CD08284299DE78D5C1ED359BB46717D8C"}; std::vector uris(vbegin(URIs), vend(URIs)); std::vector > result; SharedHandle