summaryrefslogtreecommitdiff
path: root/test/net
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-01-21 12:13:52 +0100
committerMax Kellermann <max@musicpd.org>2019-01-21 12:13:52 +0100
commit6a68e1c3f38e6e41301904ca8f7cffa51d634978 (patch)
tree35ab17c2175eb29cb770db6618ffa263dea4192f /test/net
parent85f77ec81db7a208941b5459741272ab70235e01 (diff)
test/net/TestIPv6Address: work around failure on macOS
Diffstat (limited to 'test/net')
-rw-r--r--test/net/TestIPv6Address.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/net/TestIPv6Address.cxx b/test/net/TestIPv6Address.cxx
index 69a9dc1b1..325d25bbf 100644
--- a/test/net/TestIPv6Address.cxx
+++ b/test/net/TestIPv6Address.cxx
@@ -77,6 +77,9 @@ TEST(IPv6Address, MaskFromPrefix)
EXPECT_EQ(ToString(IPv6Address::MaskFromPrefix(17).GetAddress()), "ffff:8000::");
EXPECT_EQ(ToString(IPv6Address::MaskFromPrefix(32).GetAddress()), "ffff:ffff::");
EXPECT_EQ(ToString(IPv6Address::MaskFromPrefix(64).GetAddress()), "ffff:ffff:ffff:ffff::");
- EXPECT_EQ(ToString(IPv6Address::MaskFromPrefix(112).GetAddress()), "ffff:ffff:ffff:ffff:ffff:ffff:ffff:0");
+ EXPECT_TRUE(/* glibc: */
+ ToString(IPv6Address::MaskFromPrefix(112).GetAddress()) == "ffff:ffff:ffff:ffff:ffff:ffff:ffff:0" ||
+ /* macOS: */
+ ToString(IPv6Address::MaskFromPrefix(112).GetAddress()) == "ffff:ffff:ffff:ffff:ffff:ffff:ffff::");
EXPECT_EQ(ToString(IPv6Address::MaskFromPrefix(128).GetAddress()), "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff");
}