Let tests succeed even if nullopt is returned
This is the desire behavior when the network fails so we can't just fail the test when this happens.
This commit is contained in:
parent
105ff68a6a
commit
b94df9e0d8
@ -72,9 +72,11 @@ TEST_CASE("sf::IpAddress class - [network]")
|
|||||||
SUBCASE("getPublicAddress")
|
SUBCASE("getPublicAddress")
|
||||||
{
|
{
|
||||||
const std::optional<sf::IpAddress> ipAddress = sf::IpAddress::getPublicAddress(sf::seconds(1));
|
const std::optional<sf::IpAddress> ipAddress = sf::IpAddress::getPublicAddress(sf::seconds(1));
|
||||||
REQUIRE(ipAddress.has_value());
|
if (ipAddress.has_value())
|
||||||
CHECK(ipAddress->toString() != "0.0.0.0");
|
{
|
||||||
CHECK(ipAddress->toInteger() != 0);
|
CHECK(ipAddress->toString() != "0.0.0.0");
|
||||||
|
CHECK(ipAddress->toInteger() != 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user