mirror of
https://github.com/aria2/aria2.git
synced 2026-04-02 10:55:00 +00:00
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
This commit is contained in:
@@ -76,7 +76,7 @@ void HttpHeaderProcessorTest::testParse3()
|
||||
"Content-Type:\r\n"
|
||||
"\r\n";
|
||||
CPPUNIT_ASSERT(proc.parse(s));
|
||||
SharedHandle<HttpHeader> h = proc.getResult();
|
||||
std::shared_ptr<HttpHeader> h = proc.getResult();
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("close"), h->find(HttpHeader::CONNECTION));
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("text1 text2 text3"),
|
||||
h->find(HttpHeader::ACCEPT_ENCODING));
|
||||
@@ -136,7 +136,7 @@ void HttpHeaderProcessorTest::testGetHttpResponseHeader()
|
||||
|
||||
CPPUNIT_ASSERT(proc.parse(hd));
|
||||
|
||||
SharedHandle<HttpHeader> header = proc.getResult();
|
||||
std::shared_ptr<HttpHeader> header = proc.getResult();
|
||||
CPPUNIT_ASSERT_EQUAL(404, header->getStatusCode());
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("Not Found"), header->getReasonPhrase());
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("HTTP/1.1"), header->getVersion());
|
||||
@@ -153,7 +153,7 @@ void HttpHeaderProcessorTest::testGetHttpResponseHeader_statusOnly()
|
||||
|
||||
std::string hd = "HTTP/1.1 200\r\n\r\n";
|
||||
CPPUNIT_ASSERT(proc.parse(hd));
|
||||
SharedHandle<HttpHeader> header = proc.getResult();
|
||||
std::shared_ptr<HttpHeader> header = proc.getResult();
|
||||
CPPUNIT_ASSERT_EQUAL(200, header->getStatusCode());
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ void HttpHeaderProcessorTest::testGetHttpRequestHeader()
|
||||
|
||||
CPPUNIT_ASSERT(proc.parse(request));
|
||||
|
||||
SharedHandle<HttpHeader> httpHeader = proc.getResult();
|
||||
std::shared_ptr<HttpHeader> httpHeader = proc.getResult();
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("GET"), httpHeader->getMethod());
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("/index.html"),httpHeader->getRequestPath());
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("HTTP/1.1"), httpHeader->getVersion());
|
||||
|
||||
Reference in New Issue
Block a user