aboutsummaryrefslogtreecommitdiff
path: root/unittests/Host/SocketTest.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-16 16:04:10 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-16 16:04:10 +0000
commit74a628f776edb588bff8f8f5cc16eac947c9d631 (patch)
treedc32e010ac4902621e5a279bfeb48628f7f0e166 /unittests/Host/SocketTest.cpp
parentafed7be32164a598f8172282c249af7266c48b46 (diff)
Diffstat (limited to 'unittests/Host/SocketTest.cpp')
-rw-r--r--unittests/Host/SocketTest.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/unittests/Host/SocketTest.cpp b/unittests/Host/SocketTest.cpp
index 569a4404131e..7abb010a9089 100644
--- a/unittests/Host/SocketTest.cpp
+++ b/unittests/Host/SocketTest.cpp
@@ -7,13 +7,6 @@
//
//===----------------------------------------------------------------------===//
-#if defined(_MSC_VER) && (_HAS_EXCEPTIONS == 0)
-// Workaround for MSVC standard library bug, which fails to include <thread>
-// when
-// exceptions are disabled.
-#include <eh.h>
-#endif
-
#include <cstdio>
#include <functional>
#include <thread>
@@ -203,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());
}