projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b46a72
)
Fix SocketAddressTest (again)
author
Pavel Labath
<labath@google.com>
Wed, 30 Mar 2016 09:43:04 +0000
(09:43 +0000)
committer
Pavel Labath
<labath@google.com>
Wed, 30 Mar 2016 09:43:04 +0000
(09:43 +0000)
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
lldb/unittests/Host/SocketAddressTest.cpp
patch
|
blob
|
history
diff --git
a/lldb/unittests/Host/SocketAddressTest.cpp
b/lldb/unittests/Host/SocketAddressTest.cpp
index
2aae15b
..
6b27e04
100644
(file)
--- 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 ());
}