Update unittests/Host/SocketTest.cpp to also use the new

one-socket API.

llvm-svn: 299613
This commit is contained in:
Jason Molenda 2017-04-06 03:16:44 +00:00
parent 3533cec58b
commit 30169d5ef2
1 changed files with 4 additions and 7 deletions

View File

@ -196,17 +196,14 @@ TEST_F(SocketTest, TCPGetAddress) {
}
TEST_F(SocketTest, UDPConnect) {
Socket *socket_a;
Socket *socket_b;
Socket *socket;
bool child_processes_inherit = false;
auto error = UDPSocket::Connect("127.0.0.1:0", child_processes_inherit,
socket_a, socket_b);
socket);
std::unique_ptr<Socket> a_up(socket_a);
std::unique_ptr<Socket> b_up(socket_b);
std::unique_ptr<Socket> socket_up(socket);
EXPECT_TRUE(error.Success());
EXPECT_TRUE(a_up->IsValid());
EXPECT_TRUE(b_up->IsValid());
EXPECT_TRUE(socket_up->IsValid());
}