mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
fix test for updated IP addresses
This commit is contained in:
parent
5284be25ae
commit
7c177b6f89
@ -68,7 +68,7 @@ void SocketAddressTest::testSocketAddress()
|
||||
}
|
||||
|
||||
SocketAddress sa4("pocoproject.org", 80);
|
||||
assertTrue (sa4.host().toString() == "104.130.199.50");
|
||||
assertTrue (sa4.host().toString() == "54.93.62.90");
|
||||
assertTrue (sa4.port() == 80);
|
||||
|
||||
try
|
||||
@ -117,12 +117,12 @@ void SocketAddressTest::testSocketAddress()
|
||||
catch (InvalidArgumentException&)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
SocketAddress sa10("www6.pocoproject.org", 80);
|
||||
assertTrue (sa10.host().toString() == "104.130.199.50" || sa10.host().toString() == "[2001:4801:7828:101:be76:4eff:fe10:1455]");
|
||||
|
||||
assertTrue (sa10.host().toString() == "54.93.62.90" || sa10.host().toString() == "[2001:4801:7828:101:be76:4eff:fe10:1455]");
|
||||
|
||||
SocketAddress sa11(SocketAddress::IPv4, "www6.pocoproject.org", 80);
|
||||
assertTrue (sa11.host().toString() == "104.130.199.50");
|
||||
assertTrue (sa11.host().toString() == "54.93.62.90");
|
||||
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
try
|
||||
@ -159,14 +159,14 @@ void SocketAddressTest::testSocketAddress6()
|
||||
assertTrue (sa1.af() == AF_INET6);
|
||||
assertTrue (sa1.family() == SocketAddress::IPv6);
|
||||
assertTrue (sa1.host().toString() == "fe80::e6ce:8fff:fe4a:edd0");
|
||||
assertTrue (sa1.port() == 100);
|
||||
assertTrue (sa1.port() == 100);
|
||||
assertTrue (sa1.toString() == "[fe80::e6ce:8fff:fe4a:edd0]:100");
|
||||
|
||||
SocketAddress sa2("[FE80::E6CE:8FFF:FE4A:EDD0]:100");
|
||||
assertTrue (sa2.af() == AF_INET6);
|
||||
assertTrue (sa2.family() == SocketAddress::IPv6);
|
||||
assertTrue (sa2.host().toString() == "fe80::e6ce:8fff:fe4a:edd0");
|
||||
assertTrue (sa2.port() == 100);
|
||||
assertTrue (sa2.port() == 100);
|
||||
assertTrue (sa2.toString() == "[fe80::e6ce:8fff:fe4a:edd0]:100");
|
||||
#endif
|
||||
}
|
||||
@ -179,11 +179,11 @@ void SocketAddressTest::testSocketAddressUnixLocal()
|
||||
assertTrue (sa1.af() == AF_UNIX);
|
||||
assertTrue (sa1.family() == SocketAddress::UNIX_LOCAL);
|
||||
assertTrue (sa1.toString() == "/tmp/sock1");
|
||||
|
||||
|
||||
SocketAddress sa2(SocketAddress::UNIX_LOCAL, "/tmp/sock2");
|
||||
assertTrue (sa1 != sa2);
|
||||
assertTrue (sa1 < sa2);
|
||||
|
||||
|
||||
SocketAddress sa3(SocketAddress::UNIX_LOCAL, "/tmp/sock1");
|
||||
assertTrue (sa1 == sa3);
|
||||
assertTrue (!(sa1 < sa3));
|
||||
|
Loading…
Reference in New Issue
Block a user