From: Kevin Day Date: Thu, 7 Dec 2023 01:55:50 +0000 (-0600) Subject: Update: The unit tests where socket.id needs to be set properly. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=08686fc8873e504f58b7bf5a6f0cacddce03ccef;p=fll 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. --- 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);