diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-26 22:02:41 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-26 23:19:15 +0900 |
| commit | 47402c5f29cb806f73aae2ed18aa2dde21956700 (patch) | |
| tree | 64daf58e78b8be50eb3a689bfe1c87700e8f092b /test/HttpHeaderProcessorTest.cc | |
| parent | d485c8e76758c68ce55e9554d339eaf715ae7bca (diff) | |
Refactor HttpConnection and its neighbor objects
Diffstat (limited to 'test/HttpHeaderProcessorTest.cc')
| -rw-r--r-- | test/HttpHeaderProcessorTest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/HttpHeaderProcessorTest.cc b/test/HttpHeaderProcessorTest.cc index 27388e77..d29aa16f 100644 --- a/test/HttpHeaderProcessorTest.cc +++ b/test/HttpHeaderProcessorTest.cc @@ -76,7 +76,7 @@ void HttpHeaderProcessorTest::testParse3() "Content-Type:\r\n" "\r\n"; CPPUNIT_ASSERT(proc.parse(s)); - std::shared_ptr<HttpHeader> h = proc.getResult(); + auto 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)); - std::shared_ptr<HttpHeader> header = proc.getResult(); + auto 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)); - std::shared_ptr<HttpHeader> header = proc.getResult(); + auto header = proc.getResult(); CPPUNIT_ASSERT_EQUAL(200, header->getStatusCode()); } @@ -269,7 +269,7 @@ void HttpHeaderProcessorTest::testGetHttpRequestHeader() CPPUNIT_ASSERT(proc.parse(request)); - std::shared_ptr<HttpHeader> httpHeader = proc.getResult(); + auto 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()); |
