Skip to content

Commit 25adb81

Browse files
Tests: udpsocket_sendto_invalid relaxed
1 parent 739e7a2 commit 25adb81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

TESTS/netsocket/udp/udpsocket_sendto_invalid.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ void UDPSOCKET_SENDTO_INVALID()
3232
SocketAddress addr;
3333
addr.set_ip_address("");
3434
addr.set_port(0);
35-
// UDP will be able to send 0 bytes, but no particular error is raised
36-
TEST_ASSERT_EQUAL(sock.sendto(addr, NULL, 0), 0);
35+
// Depending on the stack UDP may be able to send 0 bytes, but may also return some error code.
36+
TEST_ASSERT_TRUE(sock.sendto(addr, NULL, 0) <= 0);
3737

3838
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, NetworkInterface::get_default_instance()->gethostbyname(ECHO_SERVER_ADDR, &addr));
3939
addr.set_port(9);

0 commit comments

Comments
 (0)