value_object = json_object_object_get(config, "ImageHeight");
_kds_s2000w_handler_opts_write_int_value(value_object, value);
break;
- case 13:
- value_object = json_object_object_get(config, "ColorBalanceAggressiveness");
- _kds_s2000w_handler_opts_write_int_value(value_object, value);
- break;
case 14:
value_object = json_object_object_get(config, "ColorBalanceRed");
_kds_s2000w_handler_opts_write_int_value(value_object, value);
value_object = json_object_object_get(config, "ColorBalanceMode");
_kds_s2000w_handler_opts_write_string_value(value_object, value);
break;
+ case 42:
+ value_object = json_object_object_get(config, "ColorBalanceAggressiveness");
+ _kds_s2000w_handler_opts_write_int_value(value_object, value);
+ break;
default:
break;
}
value_object = json_object_object_get(config, "ImageHeight");
_kds_s2000w_handler_opts_write_int_value_to_json(value_object, value);
break;
- case 13:
- value_object = json_object_object_get(config, "ColorBalanceAggressiveness");
- _kds_s2000w_handler_opts_write_int_value_to_json(value_object, value);
- break;
case 14:
value_object = json_object_object_get(config, "ColorBalanceRed");
_kds_s2000w_handler_opts_write_int_value_to_json(value_object, value);
value_object = json_object_object_get(config, "ColorBalanceMode");
_kds_s2000w_handler_opts_write_string_value_to_json(value_object, value);
break;
+ case 42:
+ value_object = json_object_object_get(config, "ColorBalanceAggressiveness");
+ _kds_s2000w_handler_opts_write_int_value_to_json(value_object, value);
+ break;
case 43:
_kds_s2000w_handler_opts_set_option_to_default(h);
_kds_s2000w_handler_opts_set_autostart_on(h);
descriptor_array[10] = _kds_s2000w_option_descriptor_image_offset_y();
descriptor_array[11] = _kds_s2000w_option_descriptor_image_width();
descriptor_array[12] = _kds_s2000w_option_descriptor_image_height();
- descriptor_array[13] = _kds_s2000w_option_descriptor_color_balancea_agressiveness();
+ descriptor_array[13] = _kds_s2000w_option_descriptor_advanced_group();
descriptor_array[14] = _kds_s2000w_option_descriptor_color_balance_red();
descriptor_array[15] = _kds_s2000w_option_descriptor_color_balance_green();
descriptor_array[16] = _kds_s2000w_option_descriptor_color_balance_blue();
descriptor_array[39] = _kds_s2000w_option_descriptor_color_auto_brightness_mode();
descriptor_array[40] = _kds_s2000w_option_descriptor_color_sharpen();
descriptor_array[41] = _kds_s2000w_option_descriptor_color_balance_mode();
- descriptor_array[42] = _kds_s2000w_option_descriptor_advanced_group();
+ descriptor_array[42] = _kds_s2000w_option_descriptor_color_balancea_agressiveness();
descriptor_array[43] = _kds_s2000w_option_descriptor_config_reset();
}
h = NULL;
}
-void sane_kds_s2000w_net_control_get_option_thirdteen_test(void** state)
-{
- handler* h = kds_s2000w_handler_init();
- response* resp = (response*) *state;
- h->current_scanner_config = json_tokener_parse(resp->data);
- int32_t value = -1;
-
- sane_kds_s2000w_net_control_option(h, 13, SANE_ACTION_GET_VALUE, &value, NULL);
-
- assert_int_equal(value, 0);
-
- kds_s2000w_handler_free(h);
- h = NULL;
-}
-
void sane_kds_s2000w_net_control_get_option_fourteen_test(void** state)
{
handler* h = kds_s2000w_handler_init();
assert_string_equal(value, "Automatic");
+ kds_s2000w_handler_free(h);
+ h = NULL;
+}
+
+void sane_kds_s2000w_net_control_get_option_fourtytwo_test(void** state)
+{
+ handler* h = kds_s2000w_handler_init();
+ response* resp = (response*) *state;
+ h->current_scanner_config = json_tokener_parse(resp->data);
+ int32_t value = -1;
+
+ sane_kds_s2000w_net_control_option(h, 42, SANE_ACTION_GET_VALUE, &value, NULL);
+
+ assert_int_equal(value, 0);
+
kds_s2000w_handler_free(h);
h = NULL;
}
\ No newline at end of file
void sane_kds_s2000w_net_control_get_option_ten_test(void** state);
void sane_kds_s2000w_net_control_get_option_eleven_test(void** state);
void sane_kds_s2000w_net_control_get_option_twelve_test(void** state);
-void sane_kds_s2000w_net_control_get_option_thirdteen_test(void** state);
void sane_kds_s2000w_net_control_get_option_fourteen_test(void** state);
void sane_kds_s2000w_net_control_get_option_fifteen_test(void** state);
void sane_kds_s2000w_net_control_get_option_sixteen_test(void** state);
void sane_kds_s2000w_net_control_get_option_thirdynine_test(void** state);
void sane_kds_s2000w_net_control_get_option_fourty_test(void** state);
void sane_kds_s2000w_net_control_get_option_fourtyone_test(void** state);
+void sane_kds_s2000w_net_control_get_option_fourtytwo_test(void** state);
#endif
\ No newline at end of file
cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_ten_test, setup_default_get_option, teardown_default_get_option),
cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_eleven_test, setup_default_get_option, teardown_default_get_option),
cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_twelve_test, setup_default_get_option, teardown_default_get_option),
- cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_thirdteen_test, setup_default_get_option, teardown_default_get_option),
cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fourteen_test, setup_default_get_option, teardown_default_get_option),
cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fifteen_test, setup_default_get_option, teardown_default_get_option),
cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_sixteen_test, setup_default_get_option, teardown_default_get_option),
cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_thirdyeight_test, setup_default_get_option, teardown_default_get_option),
cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_thirdynine_test, setup_default_get_option, teardown_default_get_option),
cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fourty_test, setup_default_get_option, teardown_default_get_option),
- cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fourtyone_test, setup_default_get_option, teardown_default_get_option)
+ cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fourtyone_test, setup_default_get_option, teardown_default_get_option),
+ cmocka_unit_test_setup_teardown(sane_kds_s2000w_net_control_get_option_fourtytwo_test, setup_default_get_option, teardown_default_get_option)
};
return cmocka_run_group_tests(net_tests, NULL, NULL);
{
SANE_Option_Descriptor* option = kds_s2000w_option_descriptors_get(13);
- assert_string_equal("colorbalanceaggressiveness", option->name);
- assert_string_equal("colorbalanceaggressiveness", option->title);
- assert_string_equal("colorbalanceaggressiveness", option->desc);
- assert_int_equal(SANE_TYPE_INT, option->type);
+ assert_string_equal(SANE_NAME_ADVANCED, option->name);
+ assert_string_equal(SANE_TITLE_ADVANCED, option->title);
+ assert_string_equal(SANE_DESC_ADVANCED, option->desc);
+ assert_int_equal(SANE_TYPE_GROUP, option->type);
assert_int_equal(SANE_UNIT_NONE, option->unit);
- assert_int_equal(sizeof(SANE_Int), option->size);
- assert_int_equal(SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT, option->cap);
- assert_int_equal(SANE_CONSTRAINT_RANGE, option->constraint_type);
- assert_int_equal(-2, option->constraint.range->min);
- assert_int_equal(2, option->constraint.range->max);
- assert_int_equal(1, option->constraint.range->quant);
+ 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_fourteen_test()
{
SANE_Option_Descriptor* option = kds_s2000w_option_descriptors_get(42);
- assert_string_equal(SANE_NAME_ADVANCED, option->name);
- assert_string_equal(SANE_TITLE_ADVANCED, option->title);
- assert_string_equal(SANE_DESC_ADVANCED, option->desc);
- assert_int_equal(SANE_TYPE_GROUP, option->type);
+ assert_string_equal("colorbalanceaggressiveness", option->name);
+ assert_string_equal("colorbalanceaggressiveness", option->title);
+ assert_string_equal("colorbalanceaggressiveness", option->desc);
+ assert_int_equal(SANE_TYPE_INT, 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);
+ assert_int_equal(sizeof(SANE_Int), option->size);
+ assert_int_equal(SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT, option->cap);
+ assert_int_equal(SANE_CONSTRAINT_RANGE, option->constraint_type);
+ assert_int_equal(-2, option->constraint.range->min);
+ assert_int_equal(2, option->constraint.range->max);
+ assert_int_equal(1, option->constraint.range->quant);
}
void kds_s2000w_option_get_descriptor_fourtythree_test()