From a49397ed19f4dff0bddba555ddd715e3766c488b Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 25 Feb 2013 21:42:54 +0900 Subject: Fix infinite loop when size of downloadResults_ exceeds maxDownloadResult_ --- test/SessionSerializerTest.cc | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'test/SessionSerializerTest.cc') 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 +#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 createDownloadResult -(error_code::Value result, const std::string& uri) -{ - std::vector uris; - uris.push_back(uri); - SharedHandle entry(new FileEntry("/tmp/path", 1, 0, uris)); - std::vector > entries; - entries.push_back(entry); - SharedHandle dr(new DownloadResult()); - dr->gid = GroupId::create(); - dr->fileEntries = entries; - dr->result = result; - dr->belongsTo = 0; - dr->inMemoryDownload = false; - dr->option = SharedHandle