summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-03-30 09:43:04 +0000
committerPavel Labath <labath@google.com>2016-03-30 09:43:04 +0000
commit021ccdb7cd1050d9100481017fd18fec26a4e916 (patch)
tree647dd74ff5b5f0d6e13cfcb1f0e8becfbb4c4345
parent1b46a72eb2bd1bf22ea52cc6a72a616269e77f03 (diff)
downloadbcm5719-llvm-021ccdb7cd1050d9100481017fd18fec26a4e916.tar.gz
bcm5719-llvm-021ccdb7cd1050d9100481017fd18fec26a4e916.zip
Fix SocketAddressTest (again)
On some versions of Windows, the address is returned as "::1", while on others it's "0:0:...:0:1". Accept both versions, as they represent the same address. llvm-svn: 264850
-rw-r--r--lldb/unittests/Host/SocketAddressTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/unittests/Host/SocketAddressTest.cpp b/lldb/unittests/Host/SocketAddressTest.cpp
index 2aae15b0729..6b27e04ce70 100644
--- a/lldb/unittests/Host/SocketAddressTest.cpp
+++ b/lldb/unittests/Host/SocketAddressTest.cpp
@@ -33,7 +33,8 @@ TEST_F (SocketAddressTest, Set)
ASSERT_EQ (0, sa.GetPort ());
ASSERT_TRUE (sa.SetToLocalhost (AF_INET6, 1139));
- ASSERT_STREQ ("::1", sa.GetIPAddress ().c_str ());
+ ASSERT_TRUE(sa.GetIPAddress() == "::1" || sa.GetIPAddress() == "0:0:0:0:0:0:0:1") << "Address was: "
+ << sa.GetIPAddress();
ASSERT_EQ (1139, sa.GetPort ());
}
OpenPOWER on IntegriCloud