]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change get opts tests setup teardown for group
authorBastian Dehn <hhaalo@arcor.de>
Tue, 28 Oct 2025 17:31:58 +0000 (18:31 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Tue, 28 Oct 2025 17:31:58 +0000 (18:31 +0100)
tests/kds_s2000w_net_get_opt_tests.c

index 85950b86d68f4601f095bd3d85c9dd009ecc614d..6de0aff7c0342ec1e20d912e0404850261b5a127 100644 (file)
@@ -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