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

Commit8847a53

Browse files
committed
Renamed tests.
1 parentd100aaa commit8847a53

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

‎http/test/v2/features/client/normal_connection_test.cpp‎

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Describe(normal_http_connection) {
2727
socket_->close();
2828
}
2929

30-
voidConnectToLocalhost(boost::system::error_code &ec) {
30+
voidConnectToBoost(boost::system::error_code &ec) {
3131
// Resolve the host.
3232
tcp::resolver::queryquery("www.boost.org","80");
3333
auto it = resolver_->resolve(query, ec);
@@ -41,9 +41,8 @@ Describe(normal_http_connection) {
4141
});
4242
}
4343

44-
voidWriteToLocalhost(boost::system::error_code &ec,
45-
std::size_t &bytes_written) {
46-
44+
voidWriteToBoost(boost::system::error_code &ec,
45+
std::size_t &bytes_written) {
4746
// Create an HTTP request.
4847
http::request request{network::uri{"http://www.boost.org/"}};
4948
request.set_method(http::method::GET);
@@ -63,8 +62,8 @@ Describe(normal_http_connection) {
6362
});
6463
}
6564

66-
voidReadFromLocalhost(boost::system::error_code &ec,
67-
std::size_t &bytes_read) {
65+
voidReadFromBoost(boost::system::error_code &ec,
66+
std::size_t &bytes_read) {
6867
// Read the HTTP response on the socket from the server.
6968
char output[1024];
7069
std::memset(output,0,sizeof(output));
@@ -76,28 +75,34 @@ Describe(normal_http_connection) {
7675
});
7776
}
7877

79-
It(connects_to_localhost) {
78+
It(connects_to_boost) {
8079
boost::system::error_code ec;
81-
ConnectToLocalhost(ec);
80+
81+
ConnectToBoost(ec);
82+
8283
io_service_->run_one();
8384
Assert::That(ec,Equals(boost::system::error_code()));
8485
}
8586

86-
It(writes_to_localhost) {
87+
It(writes_to_boost) {
8788
boost::system::error_code ec;
8889
std::size_t bytes_written =0;
89-
ConnectToLocalhost(ec);
90-
WriteToLocalhost(ec, bytes_written);
90+
91+
ConnectToBoost(ec);
92+
WriteToBoost(ec, bytes_written);
93+
9194
io_service_->run();
9295
Assert::That(bytes_written,IsGreaterThan(0));
9396
}
9497

95-
It(reads_from_localhost) {
98+
It(reads_from_boost) {
9699
boost::system::error_code ec;
97100
std::size_t bytes_written =0, bytes_read =0;;
98-
ConnectToLocalhost(ec);
99-
WriteToLocalhost(ec, bytes_written);
100-
ReadFromLocalhost(ec, bytes_read);
101+
102+
ConnectToBoost(ec);
103+
WriteToBoost(ec, bytes_written);
104+
ReadFromBoost(ec, bytes_read);
105+
101106
io_service_->run();
102107
Assert::That(bytes_read,IsGreaterThan(0));
103108
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp