summaryrefslogtreecommitdiffstats
path: root/lldb/unittests/Host/SocketAddressTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/unittests/Host/SocketAddressTest.cpp')
-rw-r--r--lldb/unittests/Host/SocketAddressTest.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/lldb/unittests/Host/SocketAddressTest.cpp b/lldb/unittests/Host/SocketAddressTest.cpp
index 42242f4fe64..81bc5dcd03c 100644
--- a/lldb/unittests/Host/SocketAddressTest.cpp
+++ b/lldb/unittests/Host/SocketAddressTest.cpp
@@ -6,29 +6,24 @@
//
//===----------------------------------------------------------------------===//
+#include "lldb/Host/SocketAddress.h"
+#include "lldb/Host/Socket.h"
+#include "llvm/Testing/Support/Error.h"
+
#include "gtest/gtest.h"
-#include "lldb/Host/SocketAddress.h"
+using namespace lldb_private;
namespace {
class SocketAddressTest : public testing::Test {
public:
static void SetUpTestCase() {
-#ifdef _MSC_VER
- WSADATA data;
- ASSERT_EQ(0, WSAStartup(MAKEWORD(2, 2), &data));
-#endif
- }
- static void TearDownTestCase() {
-#ifdef _MSC_VER
- ASSERT_EQ(0, WSACleanup());
-#endif
+ ASSERT_THAT_ERROR(Socket::Initialize(), llvm::Succeeded());
}
+ static void TearDownTestCase() { Socket::Terminate(); }
};
} // namespace
-using namespace lldb_private;
-
TEST_F(SocketAddressTest, Set) {
SocketAddress sa;
ASSERT_TRUE(sa.SetToLocalhost(AF_INET, 1138));
OpenPOWER on IntegriCloud