From: Bastian Dehn Date: Tue, 28 Oct 2025 17:31:58 +0000 (+0100) Subject: change get opts tests setup teardown for group X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=e79bbd2d03bb4f14d92d8a29b989f5922f302e0e;p=sane-kds-s2000w-net.git change get opts tests setup teardown for group --- diff --git a/tests/kds_s2000w_net_get_opt_tests.c b/tests/kds_s2000w_net_get_opt_tests.c index 85950b8..6de0aff 100644 --- a/tests/kds_s2000w_net_get_opt_tests.c +++ b/tests/kds_s2000w_net_get_opt_tests.c @@ -16,7 +16,7 @@ #define FULL_PROFILE_MAX_OPTION_COUNT 48 -int setup_default_get_option(void** state) +int setup(void** state) { kds_s2000w_option_descriptors_init(PROFILE_FULL); response_t* resp = kds_s2000w_client_response_init(); @@ -83,7 +83,7 @@ int setup_default_get_option(void** state) return 0; } -int teardown_default_get_option(void** state) +int teardown(void** state) { kds_s2000w_option_descriptors_free(); response_t* resp = (response_t*) *state; @@ -956,48 +956,48 @@ void sane_kds_s2000w_net_control_get_option_fourtyseven_test(void** state) int main() { const struct CMUnitTest net_tests[] = { - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_zero_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_two_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_three_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_four_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_five_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_seven_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_eight_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_nine_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_ten_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_eleven_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twelve_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fourteen_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fifteen_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_sixteen_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_seventeen_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_nineteen_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twenty_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twentyone_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twentytwo_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twentythree_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twentyfour_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twentyfive_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twentysix_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twentyseven_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twentyeight_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twentynine_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_thirdy_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_thirdythree_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_thirdyfour_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_thirdyfive_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_thirdysix_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_thirdyseven_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_thirdyeight_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_thirdynine_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fourtyone_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fourtytwo_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fourtythree_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fourtyfour_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fourtyfive_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fourtysix_test, setup_default_get_option, teardown_default_get_option), - cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fourtyseven_test, setup_default_get_option, teardown_default_get_option) + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_zero_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_two_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_three_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_four_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_five_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_seven_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_eight_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_nine_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_ten_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_eleven_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_twelve_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_fourteen_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_fifteen_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_sixteen_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_seventeen_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_nineteen_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_twenty_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_twentyone_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_twentytwo_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_twentythree_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_twentyfour_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_twentyfive_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_twentysix_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_twentyseven_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_twentyeight_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_twentynine_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_thirdy_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_thirdythree_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_thirdyfour_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_thirdyfive_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_thirdysix_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_thirdyseven_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_thirdyeight_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_thirdynine_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_fourtyone_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_fourtytwo_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_fourtythree_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_fourtyfour_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_fourtyfive_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_fourtysix_test), + cmocka_unit_test(sane_kds_s2000w_net_control_get_option_fourtyseven_test) }; - return cmocka_run_group_tests(net_tests, NULL, NULL); + return cmocka_run_group_tests(net_tests, setup, teardown); } \ No newline at end of file