Commit 62e3abb2 authored by Subodh Iyengar's avatar Subodh Iyengar Committed by Facebook Github Bot

Fix shadow in AsyncUDPSocketTest

Summary: Fix shadown warning for xplat builds

Reviewed By: yfeldblum

Differential Revision: D7811636

fbshipit-source-id: 609b5acaca3cfdd11059ed1ebbaa969e281487a2
parent 50c13594
...@@ -382,25 +382,25 @@ std::unique_ptr<UDPClient> AsyncSocketIntegrationTest::performPingPongTest( ...@@ -382,25 +382,25 @@ std::unique_ptr<UDPClient> AsyncSocketIntegrationTest::performPingPongTest(
TEST_F(AsyncSocketIntegrationTest, PingPong) { TEST_F(AsyncSocketIntegrationTest, PingPong) {
startServer(); startServer();
auto client = performPingPongTest(folly::none, false); auto pingClient = performPingPongTest(folly::none, false);
// This should succeed. // This should succeed.
ASSERT_GT(client->pongRecvd(), 0); ASSERT_GT(pingClient->pongRecvd(), 0);
} }
TEST_F(AsyncSocketIntegrationTest, ConnectedPingPong) { TEST_F(AsyncSocketIntegrationTest, ConnectedPingPong) {
server->setChangePortForWrites(false); server->setChangePortForWrites(false);
startServer(); startServer();
auto client = performPingPongTest(server->address(), false); auto pingClient = performPingPongTest(server->address(), false);
// This should succeed // This should succeed
ASSERT_GT(client->pongRecvd(), 0); ASSERT_GT(pingClient->pongRecvd(), 0);
} }
TEST_F(AsyncSocketIntegrationTest, ConnectedPingPongServerWrongAddress) { TEST_F(AsyncSocketIntegrationTest, ConnectedPingPongServerWrongAddress) {
server->setChangePortForWrites(true); server->setChangePortForWrites(true);
startServer(); startServer();
auto client = performPingPongTest(server->address(), false); auto pingClient = performPingPongTest(server->address(), false);
// This should fail. // This should fail.
ASSERT_EQ(client->pongRecvd(), 0); ASSERT_EQ(pingClient->pongRecvd(), 0);
} }
TEST_F(AsyncSocketIntegrationTest, ConnectedPingPongClientWrongAddress) { TEST_F(AsyncSocketIntegrationTest, ConnectedPingPongClientWrongAddress) {
...@@ -408,25 +408,25 @@ TEST_F(AsyncSocketIntegrationTest, ConnectedPingPongClientWrongAddress) { ...@@ -408,25 +408,25 @@ TEST_F(AsyncSocketIntegrationTest, ConnectedPingPongClientWrongAddress) {
startServer(); startServer();
folly::SocketAddress connectAddr( folly::SocketAddress connectAddr(
server->address().getIPAddress(), server->address().getPort() + 1); server->address().getIPAddress(), server->address().getPort() + 1);
auto client = performPingPongTest(connectAddr, false); auto pingClient = performPingPongTest(connectAddr, false);
// This should fail. // This should fail.
ASSERT_EQ(client->pongRecvd(), 0); ASSERT_EQ(pingClient->pongRecvd(), 0);
} }
TEST_F(AsyncSocketIntegrationTest, PingPongUseConnectedSendMsg) { TEST_F(AsyncSocketIntegrationTest, PingPongUseConnectedSendMsg) {
server->setChangePortForWrites(false); server->setChangePortForWrites(false);
startServer(); startServer();
auto client = performPingPongTest(server->address(), true); auto pingClient = performPingPongTest(server->address(), true);
// This should succeed. // This should succeed.
ASSERT_GT(client->pongRecvd(), 0); ASSERT_GT(pingClient->pongRecvd(), 0);
} }
TEST_F(AsyncSocketIntegrationTest, PingPongUseConnectedSendMsgServerWrongAddr) { TEST_F(AsyncSocketIntegrationTest, PingPongUseConnectedSendMsgServerWrongAddr) {
server->setChangePortForWrites(true); server->setChangePortForWrites(true);
startServer(); startServer();
auto client = performPingPongTest(server->address(), true); auto pingClient = performPingPongTest(server->address(), true);
// This should fail. // This should fail.
ASSERT_EQ(client->pongRecvd(), 0); ASSERT_EQ(pingClient->pongRecvd(), 0);
} }
class TestAsyncUDPSocket : public AsyncUDPSocket { class TestAsyncUDPSocket : public AsyncUDPSocket {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment