TESTS: Allow ipv6_link_local_address() as unsupported

pull/11895/head
Ari Parkkila 2019-11-19 05:54:16 -08:00
parent a183033f59
commit 4e853bbaa3
1 changed files with 6 additions and 4 deletions

View File

@ -158,11 +158,13 @@ void NETWORKINTERFACE_STATUS_GET()
#if MBED_CONF_LWIP_IPV6_ENABLED
/* if IPv6 is enabled, validate ipv6_link_local_address API*/
SocketAddress ipv6_link_local_address = NULL;
SocketAddress ipv6_link_local_address(NULL);
err = net->get_ipv6_link_local_address(&ipv6_link_local_address);
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, err);
TEST_ASSERT_NOT_NULL(ipv6_link_local_address.get_ip_address());
TEST_ASSERT_EQUAL(NSAPI_IPv6, ipv6_link_local_address.get_ip_version());
if (err != NSAPI_ERROR_UNSUPPORTED) {
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, err);
TEST_ASSERT_NOT_NULL(ipv6_link_local_address.get_ip_address());
TEST_ASSERT_EQUAL(NSAPI_IPv6, ipv6_link_local_address.get_ip_version());
}
#endif
err = net->disconnect();