X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=test%2Fblackbox%2Frun_blackbox_tests%2Ftest_cases_rec_cb.c;h=044234b3acb0bfdc06aed36ee8aa9d6f1ed271ec;hb=fe5563f92021618b4a8b41e412c73d8364fcaf6e;hp=f9ec4770ff72d8d0f9d494a34274cd9b73404147;hpb=dc68da94af8fca91748579c84ef5ed798db7efab;p=meshlink diff --git a/test/blackbox/run_blackbox_tests/test_cases_rec_cb.c b/test/blackbox/run_blackbox_tests/test_cases_rec_cb.c index f9ec4770..044234b3 100644 --- a/test/blackbox/run_blackbox_tests/test_cases_rec_cb.c +++ b/test/blackbox/run_blackbox_tests/test_cases_rec_cb.c @@ -16,6 +16,11 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifdef NDEBUG +#undef NDEBUG +#endif + #include "execute_tests.h" #include "test_cases.h" #include "../common/containers.h" @@ -40,8 +45,6 @@ static void test_case_set_rec_cb_02(void **state); static bool test_set_rec_cb_02(void); static void test_case_set_rec_cb_03(void **state); static bool test_set_rec_cb_03(void); -static void test_case_set_rec_cb_04(void **state); -static bool test_set_rec_cb_04(void); /* Test Steps for meshlink_set_receive_cb Test Case #1 */ static black_box_state_t test_case_set_rec_cb_01_state = { @@ -65,6 +68,9 @@ pthread_mutex_t lock; /* receive callback function */ static void rec_cb(meshlink_handle_t *mesh, meshlink_node_t *source, const void *data, size_t len) { + (void)mesh; + (void)source; + assert(len); pthread_mutex_lock(&lock); @@ -115,7 +121,7 @@ static bool test_set_rec_cb_01(void) { pthread_mutex_unlock(&lock); meshlink_close(mesh_handle); - meshlink_destroy("set_receive_cb_conf"); + assert(meshlink_destroy("set_receive_cb_conf")); return true; } @@ -183,7 +189,7 @@ static bool test_set_rec_cb_03(void) { pthread_mutex_unlock(&lock); meshlink_close(mesh_handle); - meshlink_destroy("set_receive_cb_conf"); + assert(meshlink_destroy("set_receive_cb_conf")); return true; }