From 52e3981632a5ced485e7616436431854329215fa Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Tue, 12 Mar 2024 21:35:11 +0100 Subject: [PATCH] add test for option thirteenn to sixteen --- tests/kds_s2000w_net_tests.c | 68 ++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/tests/kds_s2000w_net_tests.c b/tests/kds_s2000w_net_tests.c index d026f22..f3c3cc3 100644 --- a/tests/kds_s2000w_net_tests.c +++ b/tests/kds_s2000w_net_tests.c @@ -297,6 +297,70 @@ START_TEST(sane_kds_s2000w_net_control_get_option_twelve) } END_TEST +START_TEST(sane_kds_s2000w_net_control_get_option_thirteen) +{ + 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, 13, 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 + +START_TEST(sane_kds_s2000w_net_control_get_option_fourteen) +{ + 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, 14, 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 + +START_TEST(sane_kds_s2000w_net_control_get_option_fifteen) +{ + 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, 15, 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 + +START_TEST(sane_kds_s2000w_net_control_get_option_sixteen) +{ + 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, 16, 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"); @@ -318,6 +382,10 @@ Suite* net_tests() tcase_add_test(net_tests, sane_kds_s2000w_net_control_get_option_ten); tcase_add_test(net_tests, sane_kds_s2000w_net_control_get_option_eleven); tcase_add_test(net_tests, sane_kds_s2000w_net_control_get_option_twelve); + tcase_add_test(net_tests, sane_kds_s2000w_net_control_get_option_thirteen); + tcase_add_test(net_tests, sane_kds_s2000w_net_control_get_option_fourteen); + tcase_add_test(net_tests, sane_kds_s2000w_net_control_get_option_fifteen); + tcase_add_test(net_tests, sane_kds_s2000w_net_control_get_option_sixteen); suite_add_tcase(net_tests_suite, net_tests); return net_tests_suite; } \ No newline at end of file -- 2.39.5