diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-02-25 21:42:54 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-02-25 21:42:54 +0900 |
| commit | a49397ed19f4dff0bddba555ddd715e3766c488b (patch) | |
| tree | aecfef8a76fc442548f0067eaa588ba6f070b9a3 /test/SessionSerializerTest.cc | |
| parent | 2aeb7137d0b8d6d07c9250ec2dc9fbbbef26a599 (diff) | |
Fix infinite loop when size of downloadResults_ exceeds maxDownloadResult_
Diffstat (limited to 'test/SessionSerializerTest.cc')
| -rw-r--r-- | test/SessionSerializerTest.cc | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/test/SessionSerializerTest.cc b/test/SessionSerializerTest.cc index 1e61586c..f69860f5 100644 --- a/test/SessionSerializerTest.cc +++ b/test/SessionSerializerTest.cc @@ -5,6 +5,7 @@ #include <cppunit/extensions/HelperMacros.h> +#include "TestUtil.h" #include "RequestGroupMan.h" #include "array_fun.h" #include "download_helper.h" @@ -29,26 +30,6 @@ public: CPPUNIT_TEST_SUITE_REGISTRATION(SessionSerializerTest); -namespace { -SharedHandle<DownloadResult> createDownloadResult -(error_code::Value result, const std::string& uri) -{ - std::vector<std::string> uris; - uris.push_back(uri); - SharedHandle<FileEntry> entry(new FileEntry("/tmp/path", 1, 0, uris)); - std::vector<SharedHandle<FileEntry> > entries; - entries.push_back(entry); - SharedHandle<DownloadResult> dr(new DownloadResult()); - dr->gid = GroupId::create(); - dr->fileEntries = entries; - dr->result = result; - dr->belongsTo = 0; - dr->inMemoryDownload = false; - dr->option = SharedHandle<Option>(new Option()); - return dr; -} -} // namespace - void SessionSerializerTest::testSave() { #if defined(ENABLE_BITTORRENT) && defined(ENABLE_METALINK) |
