Skip to content

Commit 329c5d8

Browse files
author
Arto Kinnunen
committed
Add unittests for added methods
Add unit tests for added methods: -get_rtt_estimate_to_address -get_stagger_estimate_to_address
1 parent b081411 commit 329c5d8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

UNITTESTS/features/netsocket/InternetSocket/test_InternetSocket.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,18 @@ TEST_F(TestInternetSocket, modify_multicast_group)
185185
EXPECT_EQ(socket->leave_multicast_group(a), NSAPI_ERROR_UNSUPPORTED);
186186
}
187187

188+
TEST_F(TestInternetSocket, network_property)
189+
{
190+
SocketAddress a("fd00:db8::ff", 1024);
191+
uint32_t rtt_estimate;
192+
uint16_t stagger_min, stagger_max, stagger_rand;
193+
stack.return_value = NSAPI_ERROR_OK;
194+
socket->open(&stack);
195+
EXPECT_EQ(socket->get_rtt_estimate_to_address(a, &rtt_estimate), NSAPI_ERROR_UNSUPPORTED);
196+
EXPECT_EQ(socket->get_rtt_estimate_to_address(a, NULL), NSAPI_ERROR_PARAMETER);
197+
EXPECT_EQ(socket->get_stagger_estimate_to_address(a, 1, &stagger_min, &stagger_max, &stagger_rand), NSAPI_ERROR_UNSUPPORTED);
198+
}
199+
188200
// set_blocking and set_timeout are tested within TCPSocket.
189201

190202
TEST_F(TestInternetSocket, bind_no_socket)

0 commit comments

Comments
 (0)