#include "kds_s2000w_debug.h"
#define AUTOSTART_ON 1
-#define OPTION_COUNT 45
+#define OPTION_COUNT 46
void _kds_s2000w_handler_opts_write_string_value(json_object* value_object, void* value)
{
#include "kds_s2000w_option_descriptors.h"
#include "kds_s2000w_debug.h"
-#define MAX_OPTION_COUNT 45
+#define MAX_OPTION_COUNT 46
SANE_Option_Descriptor* descriptor_array = NULL;
return descriptor;
}
+SANE_Option_Descriptor _kds_s2000w_option_descriptor_image_processing_group()
+{
+ kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_image_processing_group");
+
+ SANE_Option_Descriptor descriptor = {
+ "image-processing-options",
+ "Image Processing Options",
+ "Image Processing Options",
+ SANE_TYPE_GROUP,
+ SANE_UNIT_NONE,
+ 0,
+ SANE_CAP_SOFT_DETECT,
+ SANE_CONSTRAINT_NONE
+ };
+
+ return descriptor;
+}
+
void kds_s2000w_option_descriptors_init()
{
kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_init_option_descriptors");
descriptor_array[42] = _kds_s2000w_option_descriptor_edge_fill();
descriptor_array[43] = _kds_s2000w_option_descriptor_transport_handling();
descriptor_array[44] = _kds_s2000w_option_descriptor_skip_blank_pages();
+ descriptor_array[45] = _kds_s2000w_option_descriptor_image_processing_group();
}
void kds_s2000w_option_descriptors_free()
#include "../src/kds_s2000w_net.h"
#include "../src/kds_s2000w_handler.h"
-#define MAX_OPTION_COUNT 45
+#define MAX_OPTION_COUNT 46
void sane_kds_s2000w_net_control_get_option_zero_test(void** state)
{
#include "kds_s2000w_client_mock.h"
#include "../src/kds_s2000w_option_descriptors.h"
-#define MAX_OPTION_COUNT 45
+#define MAX_OPTION_COUNT 46
int setup(void** state)
{
assert_int_equal(SANE_CONSTRAINT_NONE, option->constraint_type);
}
-
void kds_s2000w_option_get_descriptor_fourty_test()
{
SANE_Option_Descriptor* option = kds_s2000w_option_descriptors_get(40);
assert_int_equal(SANE_CONSTRAINT_NONE, option->constraint_type);
}
+void kds_s2000w_option_get_descriptor_fourtyfive_test()
+{
+ SANE_Option_Descriptor* option = kds_s2000w_option_descriptors_get(45);
+
+ assert_string_equal("image-processing-options", option->name);
+ assert_string_equal("Image Processing Options", option->title);
+ assert_string_equal("Image Processing Options", option->desc);
+ assert_int_equal(SANE_TYPE_GROUP, option->type);
+ assert_int_equal(SANE_UNIT_NONE, option->unit);
+ assert_int_equal(0, option->size);
+ assert_int_equal(SANE_CAP_SOFT_DETECT, option->cap);
+ assert_int_equal(SANE_CONSTRAINT_NONE, option->constraint_type);
+}
+
void kds_s2000w_option_get_descriptor_get_by_name_test()
{
SANE_Option_Descriptor* option = kds_s2000w_option_descriptors_get_by_name("config-reset");
void kds_s2000w_option_get_descriptor_fourtytwo_test();
void kds_s2000w_option_get_descriptor_fourtythree_test();
void kds_s2000w_option_get_descriptor_fourtyfour_test();
+void kds_s2000w_option_get_descriptor_fourtyfive_test();
void kds_s2000w_option_get_descriptor_get_by_name_test();
void kds_s2000w_option_get_descriptor_over_max_options_test();
#endif
\ No newline at end of file
cmocka_unit_test_setup_teardown(kds_s2000w_option_get_descriptor_fourtytwo_test, setup, teardown),
cmocka_unit_test_setup_teardown(kds_s2000w_option_get_descriptor_fourtythree_test, setup, teardown),
cmocka_unit_test_setup_teardown(kds_s2000w_option_get_descriptor_fourtyfour_test, setup, teardown),
+ cmocka_unit_test_setup_teardown(kds_s2000w_option_get_descriptor_fourtyfive_test, setup, teardown),
cmocka_unit_test_setup_teardown(kds_s2000w_option_get_descriptor_get_by_name_test, setup, teardown),
cmocka_unit_test_setup_teardown(kds_s2000w_option_get_descriptor_over_max_options_test, setup, teardown),
};