From 08686fc8873e504f58b7bf5a6f0cacddce03ccef Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 6 Dec 2023 19:55:50 -0600 Subject: [PATCH] Update: The unit tests where socket.id needs to be set properly. The commit a55af231dacdf355323d42ba6e06f0188eb7d387 the socket.id bug in f_socket_connect() but failed to update the unit test. --- level_0/f_socket/tests/unit/c/test-socket-connect.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/level_0/f_socket/tests/unit/c/test-socket-connect.c b/level_0/f_socket/tests/unit/c/test-socket-connect.c index 7612a91..824b2be 100644 --- a/level_0/f_socket/tests/unit/c/test-socket-connect.c +++ b/level_0/f_socket/tests/unit/c/test-socket-connect.c @@ -9,6 +9,8 @@ void test__f_socket_connect__fails(void **state) { f_socket_t socket = f_socket_t_initialize; + socket.id = 1; + int errnos[] = { EACCES, EADDRINUSE, @@ -66,7 +68,8 @@ void test__f_socket_connect__returns_file_descriptor(void **state) { { f_socket_t socket = f_socket_t_initialize; - socket.id = 1; + + socket.id = -1; const f_status_t status = f_socket_connect(socket); @@ -78,6 +81,8 @@ void test__f_socket_connect__works(void **state) { f_socket_t socket = f_socket_t_initialize; + socket.id = 1; + { will_return(__wrap_connect, false); -- 1.8.3.1