Skip to content

Commit 8847a53

Browse files
committed
Renamed tests.
1 parent d100aaa commit 8847a53

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-
void ConnectToLocalhost(boost::system::error_code &ec) {
30+
void ConnectToBoost(boost::system::error_code &ec) {
3131
// Resolve the host.
3232
tcp::resolver::query query("www.boost.org", "80");
3333
auto it = resolver_->resolve(query, ec);
@@ -41,9 +41,8 @@ Describe(normal_http_connection) {
4141
});
4242
}
4343

44-
void WriteToLocalhost(boost::system::error_code &ec,
45-
std::size_t &bytes_written) {
46-
44+
void WriteToBoost(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-
void ReadFromLocalhost(boost::system::error_code &ec,
67-
std::size_t &bytes_read) {
65+
void ReadFromBoost(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)