]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
migrate start cancel
authorBastian Dehn <hhaalo@arcor.de>
Sun, 17 Mar 2024 13:17:48 +0000 (14:17 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 17 Mar 2024 13:17:48 +0000 (14:17 +0100)
tests/kds_s2000w_net_tests.c
tests/kds_s2000w_net_tests.h
tests/runtests.c

index 6193aa46588cf7a6f4bf7117b28979c45a1c1d1c..844181c77675caab39727970d2b23e1f8141b15e 100644 (file)
@@ -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);
index 07fb8cb806f76a9df01eb73b4cc0cd49e29e3c76..90e0b9985a8b293822d4c6c2af07ee3fa9c6138e 100644 (file)
@@ -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
index 57b1f55d89fba1326fee7adf5f87c5d79ae19a66..6d576d02113b8d95d97d6d333bc590babae347bd 100644 (file)
@@ -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);