Fixed compile error and unit test error without SSL library.

pull/1/head
Tatsuhiro Tsujikawa 2011-03-17 16:08:39 +09:00
parent 821dbbff1f
commit 46eced8ada
2 changed files with 6 additions and 2 deletions

View File

@ -58,8 +58,8 @@
#include "SessionSerializer.h" #include "SessionSerializer.h"
#include "TimeA2.h" #include "TimeA2.h"
#include "fmt.h" #include "fmt.h"
#include "SocketCore.h"
#ifdef ENABLE_SSL #ifdef ENABLE_SSL
# include "SocketCore.h"
# include "TLSContext.h" # include "TLSContext.h"
#endif // ENABLE_SSL #endif // ENABLE_SSL

View File

@ -347,7 +347,7 @@ void RpcMethodTest::testAddTorrent_withPosition()
void RpcMethodTest::testAddMetalink() void RpcMethodTest::testAddMetalink()
{ {
File(e_->getOption()->get(PREF_DIR)+ File(e_->getOption()->get(PREF_DIR)+
"/c908634fbc257fd56f0114912c2772aeeb4064f4.met4").remove(); "/c908634fbc257fd56f0114912c2772aeeb4064f4.meta4").remove();
AddMetalinkRpcMethod m; AddMetalinkRpcMethod m;
RpcRequest req(AddMetalinkRpcMethod::getMethodName(), List::g()); RpcRequest req(AddMetalinkRpcMethod::getMethodName(), List::g());
req.params->append(readFile(A2_TEST_DIR"/2files.metalink")); req.params->append(readFile(A2_TEST_DIR"/2files.metalink"));
@ -358,9 +358,11 @@ void RpcMethodTest::testAddMetalink()
CPPUNIT_ASSERT_EQUAL((size_t)2, resParams->size()); CPPUNIT_ASSERT_EQUAL((size_t)2, resParams->size());
CPPUNIT_ASSERT_EQUAL(std::string("1"), asString(resParams->get(0))->s()); CPPUNIT_ASSERT_EQUAL(std::string("1"), asString(resParams->get(0))->s());
CPPUNIT_ASSERT_EQUAL(std::string("2"), asString(resParams->get(1))->s()); CPPUNIT_ASSERT_EQUAL(std::string("2"), asString(resParams->get(1))->s());
#ifdef ENABLE_MESSAGE_DIGEST
CPPUNIT_ASSERT CPPUNIT_ASSERT
(File(e_->getOption()->get(PREF_DIR)+ (File(e_->getOption()->get(PREF_DIR)+
"/c908634fbc257fd56f0114912c2772aeeb4064f4.meta4").exists()); "/c908634fbc257fd56f0114912c2772aeeb4064f4.meta4").exists());
#endif // ENABLE_MESSAGE_DIGEST
SharedHandle<RequestGroup> tar = SharedHandle<RequestGroup> tar =
e_->getRequestGroupMan()->findReservedGroup(1); e_->getRequestGroupMan()->findReservedGroup(1);
@ -386,8 +388,10 @@ void RpcMethodTest::testAddMetalink()
CPPUNIT_ASSERT_EQUAL(dir+"/aria2-5.0.0.tar.bz2", CPPUNIT_ASSERT_EQUAL(dir+"/aria2-5.0.0.tar.bz2",
e_->getRequestGroupMan()->findReservedGroup(3)-> e_->getRequestGroupMan()->findReservedGroup(3)->
getFirstFilePath()); getFirstFilePath());
#ifdef ENABLE_MESSAGE_DIGEST
CPPUNIT_ASSERT CPPUNIT_ASSERT
(File(dir+"/c908634fbc257fd56f0114912c2772aeeb4064f4.meta4").exists()); (File(dir+"/c908634fbc257fd56f0114912c2772aeeb4064f4.meta4").exists());
#endif // ENABLE_MESSAGE_DIGEST
} }
} }