mirror of https://github.com/aria2/aria2
Fixed compile error and unit test error without SSL library.
parent
821dbbff1f
commit
46eced8ada
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue