Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitff5525d

Browse files
umenneldeanberris
authored andcommitted
Applied new remove chunk markers option to tests.
1 parent9ab1643 commitff5525d

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

‎libs/network/test/http/client_get_different_port_test.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ namespace http = boost::network::http;
1515
TYPED_TEST_CASE(HTTPClientTest, ClientTypes);
1616

1717
TYPED_TEST(HTTPClientTest, GetDifferentPort) {
18-
TypeParam client;
19-
typename TypeParam::requestr("http://www.boost.org:80/");
20-
auto response_ = client.get(r);
18+
using client = TypeParam;
19+
typename client::options options;
20+
options.remove_chunk_markers(true);
21+
client client_;
22+
typename TypeParam::requestrequest("http://www.boost.org:80/");
23+
auto response_ = client_.get(request);
2124
auto range =headers(response_)["Content-Type"];
2225
EXPECT_TRUE(std::begin(range) !=std::end(range));
2326
EXPECT_NE(0,body(response_).size());

‎libs/network/test/http/client_get_streaming_test.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ TYPED_TEST(HTTPClientTest, GetStreamingTest) {
3232
typename TypeParam::string_type dummy_body;
3333
body_handlerhandler_instance(body_string);
3434
{
35-
TypeParam client_;
35+
using client = TypeParam;
36+
typename client::options options;
37+
options.remove_chunk_markers(true);
38+
clientclient_(options);
3639
ASSERT_NO_THROW(response = client_.get(request, handler_instance));
3740
auto range =headers(response)["Content-Type"];
3841
ASSERT_TRUE(!boost::empty(range));

‎libs/network/test/http/client_get_test.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ TYPED_TEST_CASE(HTTPClientTest, ClientTypes);
1515
TYPED_TEST(HTTPClientTest, GetTest) {
1616
using client = TypeParam;
1717
typename client::requestrequest("http://cpp-netlib.org/");
18-
client client_;
18+
typename client::options options;
19+
options.remove_chunk_markers(true);
20+
clientclient_(options);
1921
typename client::response response;
2022
ASSERT_NO_THROW(response = client_.get(request));
2123
try {
@@ -34,7 +36,9 @@ TYPED_TEST(HTTPClientTest, GetTest) {
3436
TYPED_TEST(HTTPClientTest, GetHTTPSTest) {
3537
using client = TypeParam;
3638
typename client::requestrequest("https://www.github.com/");
37-
client client_;
39+
typename client::options options;
40+
options.remove_chunk_markers(true);
41+
clientclient_(options);
3842
typename client::response response = client_.get(request);
3943
EXPECT_TRUE(response.status() ==200 ||
4044
(response.status() >=300 && response.status() <400));
@@ -77,7 +81,9 @@ TYPED_TEST(HTTPClientTest, TemporaryClientObjectTest) {
7781
using client = TypeParam;
7882
typename client::requestrequest("http://cpp-netlib.org/");
7983
typename client::response response;
80-
ASSERT_NO_THROW(response =client().get(request));
84+
typename client::options options;
85+
options.remove_chunk_markers(true);
86+
ASSERT_NO_THROW(response =client(options).get(request));
8187
auto range =headers(response);
8288
ASSERT_TRUE(!boost::empty(range));
8389
try {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp