From: Bastian Dehn Date: Sun, 17 Mar 2024 13:21:02 +0000 (+0100) Subject: migrate cancel get parameters X-Git-Tag: v1.0.0^2~73^2~4 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=6562f5d018aef6d8766e1a1543b160cd6d7e7f24;p=sane-kds-s2000w-net.git migrate cancel get parameters --- diff --git a/tests/kds_s2000w_net_tests.c b/tests/kds_s2000w_net_tests.c index 844181c..ab33b99 100644 --- a/tests/kds_s2000w_net_tests.c +++ b/tests/kds_s2000w_net_tests.c @@ -503,20 +503,19 @@ void sane_kds_s2000w_net_start_cancel() h = NULL; } -START_TEST(sane_kds_s2000w_net_get_parameter_cancel) +void sane_kds_s2000w_net_get_parameter_cancel() { handler* h = init_handler(); h->read_info->cancel = 1; SANE_Status status = _sane_kds_s2000w_net_get_parameters(h, NULL); - ck_assert_int_eq(h->read_info->cancel, 0); - ck_assert_int_eq(status, SANE_STATUS_CANCELLED); + assert_int_equal(h->read_info->cancel, 0); + assert_int_equal(status, SANE_STATUS_CANCELLED); free_handler(h); h = NULL; } -END_TEST START_TEST(sane_kds_s2000w_net_cancel) { @@ -553,7 +552,6 @@ Suite* net_tests() Suite* net_tests_suite = suite_create("kds_s2000w_net"); TCase* net_tests = tcase_create("kds_s2000w_net_tests"); - tcase_add_test(net_tests, sane_kds_s2000w_net_get_parameter_cancel); tcase_add_test(net_tests, sane_kds_s2000w_net_cancel); tcase_add_test(net_tests, sane_kds_s2000w_net_open); suite_add_tcase(net_tests_suite, net_tests); diff --git a/tests/kds_s2000w_net_tests.h b/tests/kds_s2000w_net_tests.h index 90e0b99..8d4a023 100644 --- a/tests/kds_s2000w_net_tests.h +++ b/tests/kds_s2000w_net_tests.h @@ -36,6 +36,7 @@ void sane_kds_s2000w_net_control_get_option_twenty(); void sane_kds_s2000w_net_control_get_option_twentyone(); void sane_kds_s2000w_net_control_get_option_twentytwo(); void sane_kds_s2000w_net_start_cancel(); +void sane_kds_s2000w_net_get_parameter_cancel(); Suite* net_tests(); #endif \ No newline at end of file diff --git a/tests/runtests.c b/tests/runtests.c index 6d576d0..df9b9cb 100644 --- a/tests/runtests.c +++ b/tests/runtests.c @@ -72,7 +72,8 @@ int run_cmocka_tests() cmocka_unit_test(sane_kds_s2000w_net_control_get_option_twenty), cmocka_unit_test(sane_kds_s2000w_net_control_get_option_twentyone), cmocka_unit_test(sane_kds_s2000w_net_control_get_option_twentytwo), - cmocka_unit_test(sane_kds_s2000w_net_start_cancel) + cmocka_unit_test(sane_kds_s2000w_net_start_cancel), + cmocka_unit_test(sane_kds_s2000w_net_get_parameter_cancel) }; result = cmocka_run_group_tests(net_read_tests, NULL, NULL);