From: Bastian Dehn Date: Tue, 12 Mar 2024 20:26:42 +0000 (+0100) Subject: add test for option ten X-Git-Tag: v1.0.0^2~92 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=2431aa9879c205f9e5e45837aa8881e0c0a48c0d;p=sane-kds-s2000w-net.git add test for option ten --- diff --git a/tests/kds_s2000w_net_tests.c b/tests/kds_s2000w_net_tests.c index 5c6efe8..fd4565f 100644 --- a/tests/kds_s2000w_net_tests.c +++ b/tests/kds_s2000w_net_tests.c @@ -221,7 +221,7 @@ START_TEST(sane_kds_s2000w_net_control_get_option_eight) { handler* h = init_handler(); int option_num = 0; - int value = 0; + int value = -1; _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL); _sane_kds_s2000w_net_control_option(h, 8, SANE_ACTION_GET_VALUE, &value, NULL); @@ -249,6 +249,22 @@ START_TEST(sane_kds_s2000w_net_control_get_option_nine) } END_TEST +START_TEST(sane_kds_s2000w_net_control_get_option_ten) +{ + handler* h = init_handler(); + int option_num = 0; + int value = -1; + + _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL); + _sane_kds_s2000w_net_control_option(h, 10, SANE_ACTION_GET_VALUE, &value, NULL); + + ck_assert_int_eq(option_num, 24); + ck_assert_int_eq(value, 0); + free_handler(h); + h = NULL; +} +END_TEST + Suite* net_tests() { Suite* net_tests_suite = suite_create("kds_s2000w_net"); @@ -267,6 +283,7 @@ Suite* net_tests() tcase_add_test(net_tests, sane_kds_s2000w_net_control_get_option_six); tcase_add_test(net_tests, sane_kds_s2000w_net_control_get_option_eight); tcase_add_test(net_tests, sane_kds_s2000w_net_control_get_option_nine); + tcase_add_test(net_tests, sane_kds_s2000w_net_control_get_option_ten); suite_add_tcase(net_tests_suite, net_tests); return net_tests_suite; } \ No newline at end of file