diff --git a/test/Network/IpAddress.cpp b/test/Network/IpAddress.cpp index 07b3d097..347c9aa4 100644 --- a/test/Network/IpAddress.cpp +++ b/test/Network/IpAddress.cpp @@ -72,9 +72,11 @@ TEST_CASE("sf::IpAddress class - [network]") SUBCASE("getPublicAddress") { const std::optional ipAddress = sf::IpAddress::getPublicAddress(sf::seconds(1)); - REQUIRE(ipAddress.has_value()); - CHECK(ipAddress->toString() != "0.0.0.0"); - CHECK(ipAddress->toInteger() != 0); + if (ipAddress.has_value()) + { + CHECK(ipAddress->toString() != "0.0.0.0"); + CHECK(ipAddress->toInteger() != 0); + } } }