mirror of https://github.com/ARMmbed/mbed-os.git
Fix netsocket tests for IAR
Test case printed IP address. If ip address is null, IAR compiled binary fails. Added check for printing null. If IP address is null, then it prints string 'null'.pull/11220/head
parent
6a17d74b55
commit
65bf17eff5
|
@ -72,7 +72,7 @@ static void _ifup()
|
|||
NetworkInterface *net = NetworkInterface::get_default_instance();
|
||||
nsapi_error_t err = net->connect();
|
||||
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, err);
|
||||
printf("MBED: TCPClient IP address is '%s'\n", net->get_ip_address());
|
||||
printf("MBED: TCPClient IP address is '%s'\n", net->get_ip_address() ? net->get_ip_address() : "null");
|
||||
}
|
||||
|
||||
static void _ifdown()
|
||||
|
|
|
@ -94,7 +94,7 @@ static void _ifup()
|
|||
NetworkInterface *net = NetworkInterface::get_default_instance();
|
||||
nsapi_error_t err = net->connect();
|
||||
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, err);
|
||||
printf("MBED: TLSClient IP address is '%s'\n", net->get_ip_address());
|
||||
printf("MBED: TLSClient IP address is '%s'\n", net->get_ip_address() ? net->get_ip_address() : "null");
|
||||
}
|
||||
|
||||
static void _ifdown()
|
||||
|
|
|
@ -59,7 +59,7 @@ static void _ifup()
|
|||
NetworkInterface *net = NetworkInterface::get_default_instance();
|
||||
nsapi_error_t err = net->connect();
|
||||
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, err);
|
||||
printf("MBED: UDPClient IP address is '%s'\n", net->get_ip_address());
|
||||
printf("MBED: UDPClient IP address is '%s'\n", net->get_ip_address() ? net->get_ip_address() : "null");
|
||||
}
|
||||
|
||||
static void _ifdown()
|
||||
|
|
Loading…
Reference in New Issue