]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
move get opt tests in seperate file
authorBastian Dehn <hhaalo@arcor.de>
Fri, 29 Mar 2024 10:21:43 +0000 (11:21 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Fri, 29 Mar 2024 10:21:43 +0000 (11:21 +0100)
tests/CMakeLists.txt
tests/kds_s2000w_net_get_opt_tests.c [new file with mode: 0644]
tests/kds_s2000w_net_get_opt_tests.h [new file with mode: 0644]
tests/kds_s2000w_net_get_opt_tests_run.c [new file with mode: 0644]
tests/kds_s2000w_net_tests.c
tests/kds_s2000w_net_tests.h
tests/kds_s2000w_net_tests_run.c

index 8c36c5bd83b394821f3e9a80d2df6b62a007af73..ed63bf6b9a37b30a372b2efe286c28e95c322858 100644 (file)
@@ -4,6 +4,15 @@ FIND_PACKAGE(CMOCKA REQUIRED)
 
 MESSAGE(STATUS "find ${CMOCKA_LIBRARY}")
 
+ADD_EXECUTABLE("kds_s2000w_net_get_opt_tests_run"
+       "kds_s2000w_net_get_opt_tests_run.c"
+       "kds_s2000w_net_get_opt_tests.c"
+       "kds_s2000w_client_mock.c")
+ADD_DEPENDENCIES("kds_s2000w_net_get_opt_tests_run" sane-kds_s2000w_net)
+TARGET_LINK_LIBRARIES("kds_s2000w_net_get_opt_tests_run"
+       ${CMOCKA_LIBRARY}
+       sane-kds_s2000w_net)
+
 ADD_EXECUTABLE("kds_s2000w_net_read_tests_run"
        "kds_s2000w_net_read_tests_run.c"
        "kds_s2000w_net_read_tests.c"
@@ -34,6 +43,8 @@ TARGET_LINK_LIBRARIES("kds_s2000w_read_config_tests_run"
 INCLUDE(CTest)
 ENABLE_TESTING()
 
+ADD_TEST(NAME "kds_s2000w_net_get_opt_tests_run"
+       COMMAND "./kds_s2000w_net_get_opt_tests_run")
 ADD_TEST(NAME "kds_s2000w_net_read_tests_run"
        COMMAND "./kds_s2000w_net_read_tests_run")
 ADD_TEST(NAME "kds_s2000w_net_tests_run"
diff --git a/tests/kds_s2000w_net_get_opt_tests.c b/tests/kds_s2000w_net_get_opt_tests.c
new file mode 100644 (file)
index 0000000..e589320
--- /dev/null
@@ -0,0 +1,437 @@
+
+#include <stdlib.h>
+#include <sane/sane.h>
+#include <string.h>
+#include "kds_s2000w_net_tests.h"
+#include "kds_s2000w_client_mock.h"
+#include "../src/kds_s2000w_config.h"
+#include "../src/kds_s2000w_net.h"
+#include "../src/kds_s2000w_handler.h"
+#include "../src/kds_s2000w_image_converter.h"
+
+void __wrap_load_config(program_config* config, const char* config_stream)
+{
+       return;
+}
+
+void __wrap_kds_s2000w_convert_jpg_to_pnm(blobdata* in, blobdata* out)
+{
+       return;
+}
+
+void sane_kds_s2000w_net_control_get_option_zero(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       handler* h = init_handler();
+       int value = 0;
+
+       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       assert_int_equal(value, 24);
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_two(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       handler* h = init_handler();
+       int option_num = 0;
+       char value[50] = {0};
+
+       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
+       _sane_kds_s2000w_net_control_option(h, 2, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       assert_int_equal(option_num, 24);
+       assert_string_equal(value, "DocumentFeeder");
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_three(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       handler* h = init_handler();
+       int option_num = 0;
+       char value[50] = {0};
+
+       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
+       _sane_kds_s2000w_net_control_option(h, 3, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       assert_int_equal(option_num, 24);
+       assert_string_equal(value, "Color");
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_four(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       handler* h = init_handler();
+       int option_num = 0;
+       int value = 0;
+
+       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
+       _sane_kds_s2000w_net_control_option(h, 4, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       assert_int_equal(option_num, 24);
+       assert_int_equal(value, 200);
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_five(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       handler* h = init_handler();
+       int option_num = 0;
+       char value[50] = {0};
+
+       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
+       _sane_kds_s2000w_net_control_option(h, 5, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       assert_int_equal(option_num, 24);
+       assert_string_equal(value, "Duplex");
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_six(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       handler* h = init_handler();
+       int option_num = 0;
+       int value = 0;
+
+       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
+       _sane_kds_s2000w_net_control_option(h, 6, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       assert_int_equal(option_num, 24);
+       assert_int_equal(value, 8);
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_eight(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       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, 8, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       assert_int_equal(option_num, 24);
+       assert_int_equal(value, 0);
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_nine(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       handler* h = init_handler();
+       int option_num = 0;
+       char value[50] = {0};
+
+       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
+       _sane_kds_s2000w_net_control_option(h, 9, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       assert_int_equal(option_num, 24);
+       assert_string_equal(value, "None");
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_ten(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       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);
+
+       assert_int_equal(option_num, 24);
+       assert_int_equal(value, 0);
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_eleven(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       handler* h = init_handler();
+       int option_num = 0;
+       char value[50] = {0};
+
+       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
+       _sane_kds_s2000w_net_control_option(h, 11, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       assert_int_equal(option_num, 24);
+       assert_string_equal(value, "Automatic");
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_twelve(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       handler* h = init_handler();
+       int option_num = 0;
+       char value[50] = {0};
+
+       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
+       _sane_kds_s2000w_net_control_option(h, 12, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       assert_int_equal(option_num, 24);
+       assert_string_equal(value, "Automatic");
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_thirteen(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       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);
+
+       assert_int_equal(option_num, 24);
+       assert_int_equal(value, 0);
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_fourteen(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       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);
+
+       assert_int_equal(option_num, 24);
+       assert_int_equal(value, 0);
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_fifteen(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       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);
+
+       assert_int_equal(option_num, 24);
+       assert_int_equal(value, 0);
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_sixteen(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       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);
+
+       assert_int_equal(option_num, 24);
+       assert_int_equal(value, 0);
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_seventeen(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       handler* h = init_handler();
+       int option_num = 0;
+       char value[50] = {0};
+
+       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
+       _sane_kds_s2000w_net_control_option(h, 17, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       assert_int_equal(option_num, 24);
+       assert_string_equal(value, "None");
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_eightteen(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       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, 18, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       assert_int_equal(option_num, 24);
+       assert_int_equal(value, 0);
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_nineteen(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       handler* h = init_handler();
+       int option_num = 0;
+       char value[50] = {0};
+
+       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
+       _sane_kds_s2000w_net_control_option(h, 19, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       assert_int_equal(option_num, 24);
+       assert_string_equal(value, "None");
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_twenty(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       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, 20, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       assert_int_equal(option_num, 24);
+       assert_int_equal(value, 0);
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_twentyone(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       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, 21, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       assert_int_equal(option_num, 24);
+       assert_int_equal(value, 0);
+
+       free_handler(h);
+       h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_twentytwo(void** state)
+{
+       response* resp = (response*) *state;
+       will_return(mock_response, resp);
+       will_return(__wrap_kds_s2000w_client_get_option, 0);
+       expect_function_call(__wrap_kds_s2000w_client_get_option);
+       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, 22, SANE_ACTION_GET_VALUE, &value, NULL);
+
+       assert_int_equal(option_num, 24);
+       assert_int_equal(value, 140);
+
+       free_handler(h);
+       h = NULL;
+}
diff --git a/tests/kds_s2000w_net_get_opt_tests.h b/tests/kds_s2000w_net_get_opt_tests.h
new file mode 100644 (file)
index 0000000..293fd40
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef KDS_S2000W_NET_GET_OPT_TESTS_H
+#define KDS_S2000W_NET_GET_OPT_TESTS_H
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <setjmp.h>
+#include <cmocka.h>
+
+void sane_kds_s2000w_net_control_get_option_zero(void** state);
+void sane_kds_s2000w_net_control_get_option_two(void** state);
+void sane_kds_s2000w_net_control_get_option_three(void** state);
+void sane_kds_s2000w_net_control_get_option_four(void** state);
+void sane_kds_s2000w_net_control_get_option_five(void** state);
+void sane_kds_s2000w_net_control_get_option_six(void** state);
+void sane_kds_s2000w_net_control_get_option_eight(void** state);
+void sane_kds_s2000w_net_control_get_option_nine(void** state);
+void sane_kds_s2000w_net_control_get_option_ten(void** state);
+void sane_kds_s2000w_net_control_get_option_eleven(void** state);
+void sane_kds_s2000w_net_control_get_option_twelve(void** state);
+void sane_kds_s2000w_net_control_get_option_thirteen(void** state);
+void sane_kds_s2000w_net_control_get_option_fourteen(void** state);
+void sane_kds_s2000w_net_control_get_option_fifteen(void** state);
+void sane_kds_s2000w_net_control_get_option_sixteen(void** state);
+void sane_kds_s2000w_net_control_get_option_seventeen(void** state);
+void sane_kds_s2000w_net_control_get_option_eightteen(void** state);
+void sane_kds_s2000w_net_control_get_option_nineteen(void** state);
+void sane_kds_s2000w_net_control_get_option_twenty(void** state);
+void sane_kds_s2000w_net_control_get_option_twentyone(void** state);
+void sane_kds_s2000w_net_control_get_option_twentytwo(void** state);
+
+#endif
\ No newline at end of file
diff --git a/tests/kds_s2000w_net_get_opt_tests_run.c b/tests/kds_s2000w_net_get_opt_tests_run.c
new file mode 100644 (file)
index 0000000..afa1041
--- /dev/null
@@ -0,0 +1,87 @@
+#include <stdlib.h>
+#include <string.h>
+#include "kds_s2000w_net_get_opt_tests.h"
+#include "kds_s2000w_client_mock.h"
+
+int setup_default_get_option(void** state)
+{
+       response* resp = kds_s2000w_client_response_init();
+       resp->data = realloc(resp->data, 919);
+       const char* responsedata = "{ \
+               \"Status\": { \
+                       \"NumImagesScanned\": 0, \
+                       \"NumImagesStored\": 0, \
+                       \"State\": \"In Session\", \
+                       \"ErrorNum\": 0, \
+                       \"LastError\": \"Status: 200 Success\", \
+                       \"PaperDetected\": \"0\", \
+                       \"PercentAvailable\": 99 \
+               }, \
+               \"Configuration\": { \
+                       \"DPI\": 200, \
+                       \"ScanSide\": \"Duplex\", \
+                       \"ColorMode\": \"Color\", \
+                       \"SkipBlankPages\": 0, \
+                       \"AutoStart\": 0, \
+                       \"ColorDropOut\": \"None\", \
+                       \"ColorDropOutAggressiveness\": 0, \
+                       \"OutputType\": \"Images\", \
+                       \"ColorAutoBrightnessMode\": \"Automatic\", \
+                       \"ColorBalanceMode\": \"Automatic\", \
+                       \"ColorBalanceAggressiveness\": 0, \
+                       \"ColorBalanceRed\": 0, \
+                       \"ColorBalanceGreen\": 0, \
+                       \"ColorBalanceBlue\": 0, \
+                       \"ForegroundBoldnessMode\": \"None\", \
+                       \"ForegroundBoldnessAggressiveness\": 0, \
+                       \"BackgroundSmoothingMode\": \"None\", \
+                       \"BackgroundSmoothingAggressiveness\": 0, \
+                       \"BinarizationMode\": \"iThresholding\", \
+                       \"BinarizationContrast\": 0, \
+                       \"MaxDocumentLength\": 140, \
+                       \"ScanSource\": \"DocumentFeeder\" \
+               } \
+       }\0";
+       memcpy(resp->data, responsedata, 919);
+       resp->code = 200;
+       resp->size = 919;
+       *state = resp;
+       return 0;
+}
+
+int teardown_default_get_option(void** state)
+{
+       response* resp = (response*) *state;
+       kds_s2000w_client_response_free(resp);
+       resp = NULL;
+       return 0;
+}
+
+int main()
+{
+       const struct CMUnitTest net_tests[] = {
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_zero, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_two, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_three, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_four, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_five, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_six, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_eight, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_nine, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_ten, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_eleven, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twelve, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_thirteen, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fourteen, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fifteen, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_sixteen, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_seventeen, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_eightteen, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_nineteen, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twenty, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twentyone, setup_default_get_option, teardown_default_get_option),
+               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twentytwo, setup_default_get_option, teardown_default_get_option),
+       };
+
+       return cmocka_run_group_tests(net_tests, NULL, NULL);
+}
\ No newline at end of file
index bac356adcf20314336a7c2c96c16c2809f4331fb..0a46ab509ef4885983b06e135fd87d5cd6c0cce7 100644 (file)
@@ -108,422 +108,6 @@ void kds_s2000w_net_get_select_fd()
        assert_int_equal(result, SANE_STATUS_UNSUPPORTED);
 }
 
-void sane_kds_s2000w_net_control_get_option_zero(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       handler* h = init_handler();
-       int value = 0;
-
-       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &value, NULL);
-
-       assert_int_equal(value, 24);
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_two(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       handler* h = init_handler();
-       int option_num = 0;
-       char value[50] = {0};
-
-       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
-       _sane_kds_s2000w_net_control_option(h, 2, SANE_ACTION_GET_VALUE, &value, NULL);
-
-       assert_int_equal(option_num, 24);
-       assert_string_equal(value, "DocumentFeeder");
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_three(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       handler* h = init_handler();
-       int option_num = 0;
-       char value[50] = {0};
-
-       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
-       _sane_kds_s2000w_net_control_option(h, 3, SANE_ACTION_GET_VALUE, &value, NULL);
-
-       assert_int_equal(option_num, 24);
-       assert_string_equal(value, "Color");
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_four(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       handler* h = init_handler();
-       int option_num = 0;
-       int value = 0;
-
-       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
-       _sane_kds_s2000w_net_control_option(h, 4, SANE_ACTION_GET_VALUE, &value, NULL);
-
-       assert_int_equal(option_num, 24);
-       assert_int_equal(value, 200);
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_five(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       handler* h = init_handler();
-       int option_num = 0;
-       char value[50] = {0};
-
-       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
-       _sane_kds_s2000w_net_control_option(h, 5, SANE_ACTION_GET_VALUE, &value, NULL);
-
-       assert_int_equal(option_num, 24);
-       assert_string_equal(value, "Duplex");
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_six(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       handler* h = init_handler();
-       int option_num = 0;
-       int value = 0;
-
-       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
-       _sane_kds_s2000w_net_control_option(h, 6, SANE_ACTION_GET_VALUE, &value, NULL);
-
-       assert_int_equal(option_num, 24);
-       assert_int_equal(value, 8);
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_eight(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       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, 8, SANE_ACTION_GET_VALUE, &value, NULL);
-
-       assert_int_equal(option_num, 24);
-       assert_int_equal(value, 0);
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_nine(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       handler* h = init_handler();
-       int option_num = 0;
-       char value[50] = {0};
-
-       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
-       _sane_kds_s2000w_net_control_option(h, 9, SANE_ACTION_GET_VALUE, &value, NULL);
-
-       assert_int_equal(option_num, 24);
-       assert_string_equal(value, "None");
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_ten(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       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);
-
-       assert_int_equal(option_num, 24);
-       assert_int_equal(value, 0);
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_eleven(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       handler* h = init_handler();
-       int option_num = 0;
-       char value[50] = {0};
-
-       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
-       _sane_kds_s2000w_net_control_option(h, 11, SANE_ACTION_GET_VALUE, &value, NULL);
-
-       assert_int_equal(option_num, 24);
-       assert_string_equal(value, "Automatic");
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_twelve(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       handler* h = init_handler();
-       int option_num = 0;
-       char value[50] = {0};
-
-       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
-       _sane_kds_s2000w_net_control_option(h, 12, SANE_ACTION_GET_VALUE, &value, NULL);
-
-       assert_int_equal(option_num, 24);
-       assert_string_equal(value, "Automatic");
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_thirteen(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       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);
-
-       assert_int_equal(option_num, 24);
-       assert_int_equal(value, 0);
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_fourteen(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       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);
-
-       assert_int_equal(option_num, 24);
-       assert_int_equal(value, 0);
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_fifteen(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       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);
-
-       assert_int_equal(option_num, 24);
-       assert_int_equal(value, 0);
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_sixteen(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       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);
-
-       assert_int_equal(option_num, 24);
-       assert_int_equal(value, 0);
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_seventeen(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       handler* h = init_handler();
-       int option_num = 0;
-       char value[50] = {0};
-
-       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
-       _sane_kds_s2000w_net_control_option(h, 17, SANE_ACTION_GET_VALUE, &value, NULL);
-
-       assert_int_equal(option_num, 24);
-       assert_string_equal(value, "None");
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_eightteen(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       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, 18, SANE_ACTION_GET_VALUE, &value, NULL);
-
-       assert_int_equal(option_num, 24);
-       assert_int_equal(value, 0);
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_nineteen(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       handler* h = init_handler();
-       int option_num = 0;
-       char value[50] = {0};
-
-       _sane_kds_s2000w_net_control_option(h, 0, SANE_ACTION_GET_VALUE, &option_num, NULL);
-       _sane_kds_s2000w_net_control_option(h, 19, SANE_ACTION_GET_VALUE, &value, NULL);
-
-       assert_int_equal(option_num, 24);
-       assert_string_equal(value, "None");
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_twenty(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       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, 20, SANE_ACTION_GET_VALUE, &value, NULL);
-
-       assert_int_equal(option_num, 24);
-       assert_int_equal(value, 0);
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_twentyone(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       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, 21, SANE_ACTION_GET_VALUE, &value, NULL);
-
-       assert_int_equal(option_num, 24);
-       assert_int_equal(value, 0);
-
-       free_handler(h);
-       h = NULL;
-}
-
-void sane_kds_s2000w_net_control_get_option_twentytwo(void** state)
-{
-       response* resp = (response*) *state;
-       will_return(mock_response, resp);
-       will_return(__wrap_kds_s2000w_client_get_option, 0);
-       expect_function_call(__wrap_kds_s2000w_client_get_option);
-       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, 22, SANE_ACTION_GET_VALUE, &value, NULL);
-
-       assert_int_equal(option_num, 24);
-       assert_int_equal(value, 140);
-
-       free_handler(h);
-       h = NULL;
-}
 
 void sane_kds_s2000w_net_start_cancel()
 {
index e00bfd3efe50f732f320f598a7911073bd9f5fd4..19a53807f822ed818c3070dd0b9db311f872b0c2 100644 (file)
@@ -12,27 +12,6 @@ void kds_s2000w_net_init();
 void kds_s2000w_net_get_devices_only_remote();
 void kds_s2000w_net_set_io_mode();
 void kds_s2000w_net_get_select_fd();
-void sane_kds_s2000w_net_control_get_option_zero(void** state);
-void sane_kds_s2000w_net_control_get_option_two(void** state);
-void sane_kds_s2000w_net_control_get_option_three(void** state);
-void sane_kds_s2000w_net_control_get_option_four(void** state);
-void sane_kds_s2000w_net_control_get_option_five(void** state);
-void sane_kds_s2000w_net_control_get_option_six(void** state);
-void sane_kds_s2000w_net_control_get_option_eight(void** state);
-void sane_kds_s2000w_net_control_get_option_nine(void** state);
-void sane_kds_s2000w_net_control_get_option_ten(void** state);
-void sane_kds_s2000w_net_control_get_option_eleven(void** state);
-void sane_kds_s2000w_net_control_get_option_twelve(void** state);
-void sane_kds_s2000w_net_control_get_option_thirteen(void** state);
-void sane_kds_s2000w_net_control_get_option_fourteen(void** state);
-void sane_kds_s2000w_net_control_get_option_fifteen(void** state);
-void sane_kds_s2000w_net_control_get_option_sixteen(void** state);
-void sane_kds_s2000w_net_control_get_option_seventeen(void** state);
-void sane_kds_s2000w_net_control_get_option_eightteen(void** state);
-void sane_kds_s2000w_net_control_get_option_nineteen(void** state);
-void sane_kds_s2000w_net_control_get_option_twenty(void** state);
-void sane_kds_s2000w_net_control_get_option_twentyone(void** state);
-void sane_kds_s2000w_net_control_get_option_twentytwo(void** state);
 void sane_kds_s2000w_net_start_cancel();
 void sane_kds_s2000w_net_start(void** state);
 void sane_kds_s2000w_net_start_one_page_per_flatscan(void** state);
index d286f879781487df31a66ef6dc2e1842329ff743..0ef32e7cc4c09a25bf516f93d8860cf9165f3463 100644 (file)
@@ -3,60 +3,6 @@
 #include "kds_s2000w_net_tests.h"
 #include "kds_s2000w_client_mock.h"
 
-int setup_default_get_option(void** state)
-{
-       response* resp = kds_s2000w_client_response_init();
-       resp->data = realloc(resp->data, 919);
-       const char* responsedata = "{ \
-               \"Status\": { \
-                       \"NumImagesScanned\": 0, \
-                       \"NumImagesStored\": 0, \
-                       \"State\": \"In Session\", \
-                       \"ErrorNum\": 0, \
-                       \"LastError\": \"Status: 200 Success\", \
-                       \"PaperDetected\": \"0\", \
-                       \"PercentAvailable\": 99 \
-               }, \
-               \"Configuration\": { \
-                       \"DPI\": 200, \
-                       \"ScanSide\": \"Duplex\", \
-                       \"ColorMode\": \"Color\", \
-                       \"SkipBlankPages\": 0, \
-                       \"AutoStart\": 0, \
-                       \"ColorDropOut\": \"None\", \
-                       \"ColorDropOutAggressiveness\": 0, \
-                       \"OutputType\": \"Images\", \
-                       \"ColorAutoBrightnessMode\": \"Automatic\", \
-                       \"ColorBalanceMode\": \"Automatic\", \
-                       \"ColorBalanceAggressiveness\": 0, \
-                       \"ColorBalanceRed\": 0, \
-                       \"ColorBalanceGreen\": 0, \
-                       \"ColorBalanceBlue\": 0, \
-                       \"ForegroundBoldnessMode\": \"None\", \
-                       \"ForegroundBoldnessAggressiveness\": 0, \
-                       \"BackgroundSmoothingMode\": \"None\", \
-                       \"BackgroundSmoothingAggressiveness\": 0, \
-                       \"BinarizationMode\": \"iThresholding\", \
-                       \"BinarizationContrast\": 0, \
-                       \"MaxDocumentLength\": 140, \
-                       \"ScanSource\": \"DocumentFeeder\" \
-               } \
-       }\0";
-       memcpy(resp->data, responsedata, 919);
-       resp->code = 200;
-       resp->size = 919;
-       *state = resp;
-       return 0;
-}
-
-int teardown_default_get_option(void** state)
-{
-       response* resp = (response*) *state;
-       kds_s2000w_client_response_free(resp);
-       resp = NULL;
-       return 0;
-}
-
 int setup_net_start(void** state)
 {
        response** response_list = malloc(sizeof(response*) * 3);
@@ -104,27 +50,6 @@ int main()
                cmocka_unit_test(kds_s2000w_net_get_devices_only_remote),
                cmocka_unit_test(kds_s2000w_net_set_io_mode),
                cmocka_unit_test(kds_s2000w_net_get_select_fd),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_zero, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_two, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_three, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_four, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_five, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_six, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_eight, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_nine, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_ten, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_eleven, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twelve, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_thirteen, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fourteen, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fifteen, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_sixteen, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_seventeen, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_eightteen, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_nineteen, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twenty, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twentyone, setup_default_get_option, teardown_default_get_option),
-               cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twentytwo, setup_default_get_option, teardown_default_get_option),
                cmocka_unit_test(sane_kds_s2000w_net_start_cancel),
                cmocka_unit_test(sane_kds_s2000w_net_get_parameter_cancel),
                cmocka_unit_test(sane_kds_s2000w_net_cancel),