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,11 +72,13 @@ TEST_CASE("sf::IpAddress class - [network]")
|
||||
SUBCASE("getPublicAddress")
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SUBCASE("Static constants")
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user