Skip to content

Commit 5162038

Browse files
matlo607konserw
authored andcommitted
fix conflicting "using std" declaration with "using boost::thread"
1 parent 4ee3b04 commit 5162038

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/integration/WireServerTest.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ using namespace boost::asio::ip;
1616
#if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
1717
using namespace boost::asio::local;
1818
#endif
19-
using namespace std;
2019
using namespace testing;
2120
using boost::bind;
2221
using boost::thread;
2322
namespace fs = boost::filesystem;
2423

2524
static const time_duration THREAD_TEST_TIMEOUT = milliseconds(4000);
2625

27-
MATCHER(IsConnected, string(negation ? "is not" : "is") +
28-
" connected") { return arg.good(); }
26+
MATCHER(IsConnected, std::string(negation ? "is not" : "is") + " connected") {
27+
return arg.good();
28+
}
2929

3030
MATCHER(HasTerminated, "") {
3131
return !arg.joinable();
@@ -55,7 +55,7 @@ MATCHER_P(EventuallyReceives, value, "") {
5555

5656
class MockProtocolHandler : public ProtocolHandler {
5757
public:
58-
MOCK_CONST_METHOD1(handle, string(const string &request));
58+
MOCK_CONST_METHOD1(handle, std::string(const std::string& request));
5959
};
6060

6161
class SocketServerTest : public Test {
@@ -134,8 +134,8 @@ TEST_F(TCPSocketServerTest, receiveAndSendsSingleLineMassages) {
134134
ASSERT_THAT(client, IsConnected());
135135

136136
// when
137-
client << "1" << flush << "2" << endl << flush;
138-
client << "3" << endl << "4" << endl << flush;
137+
client << "1" << std::flush << "2" << std::endl << std::flush;
138+
client << "3" << std::endl << "4" << std::endl << std::flush;
139139

140140
// then
141141
EXPECT_THAT(client, EventuallyReceives("A"));
@@ -204,7 +204,7 @@ TEST_F(UnixSocketServerTest, fullLifecycle) {
204204

205205
// traffic flows
206206
stream_protocol::iostream client(socketName);
207-
client << "X" << endl << flush;
207+
client << "X" << std::endl << std::flush;
208208
EXPECT_THAT(client, EventuallyReceives("Y"));
209209

210210
// client disconnection terminates server

0 commit comments

Comments
 (0)