From 947e9cfca8d2cdcc695c261329fd718ab8cf0796 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sun, 17 Mar 2024 14:17:48 +0100 Subject: [PATCH] migrate start cancel --- tests/kds_s2000w_net_tests.c | 8 +++----- tests/kds_s2000w_net_tests.h | 1 + tests/runtests.c | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/kds_s2000w_net_tests.c b/tests/kds_s2000w_net_tests.c index 6193aa4..844181c 100644 --- a/tests/kds_s2000w_net_tests.c +++ b/tests/kds_s2000w_net_tests.c @@ -489,20 +489,19 @@ void sane_kds_s2000w_net_control_get_option_twentytwo() h = NULL; } -START_TEST(sane_kds_s2000w_net_start_cancel) +void sane_kds_s2000w_net_start_cancel() { handler* h = init_handler(); h->read_info->cancel = 1; SANE_Status status = _sane_kds_s2000w_net_start(h); - 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_get_parameter_cancel) { @@ -555,7 +554,6 @@ Suite* net_tests() 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_start_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 07fb8cb..90e0b99 100644 --- a/tests/kds_s2000w_net_tests.h +++ b/tests/kds_s2000w_net_tests.h @@ -35,6 +35,7 @@ void sane_kds_s2000w_net_control_get_option_nineteen(); 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(); Suite* net_tests(); #endif \ No newline at end of file diff --git a/tests/runtests.c b/tests/runtests.c index 57b1f55..6d576d0 100644 --- a/tests/runtests.c +++ b/tests/runtests.c @@ -71,7 +71,8 @@ int run_cmocka_tests() cmocka_unit_test(sane_kds_s2000w_net_control_get_option_nineteen), 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_control_get_option_twentytwo), + cmocka_unit_test(sane_kds_s2000w_net_start_cancel) }; result = cmocka_run_group_tests(net_read_tests, NULL, NULL); -- 2.39.5