From: Bastian Dehn Date: Sat, 25 Oct 2025 16:46:22 +0000 (+0200) Subject: add tests status assert X-Git-Tag: v1.1.16^2~1^2~8 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=f2ba4f70d0abf09650095dff4d3b8b5675cc4ca7;p=sane-kds-s2000w-net.git add tests status assert --- diff --git a/tests/kds_s2000w_net_set_opt_tests.c b/tests/kds_s2000w_net_set_opt_tests.c index e6bea79..ef00a54 100644 --- a/tests/kds_s2000w_net_set_opt_tests.c +++ b/tests/kds_s2000w_net_set_opt_tests.c @@ -109,12 +109,13 @@ void kds_s2000w_net_set_option_string(void** state) expect_function_call(__wrap_kds_s2000w_client_set_option); expect_function_call(__wrap_kds_s2000w_client_set_option); - sane_kds_s2000w_net_control_option(h, 3, SANE_ACTION_SET_VALUE, "Gray", info); + SANE_Status status = sane_kds_s2000w_net_control_option(h, 3, SANE_ACTION_SET_VALUE, "Gray", info); json_object* config = json_object_object_get(h->scanner_config, "Configuration"); json_object* value_object = json_object_object_get(config, COLOR_MODE); const char* value = json_object_get_string(value_object); + assert_int_equal(status, SANE_STATUS_GOOD); assert_string_equal(value, "Gray"); assert_int_equal(*info, SANE_INFO_RELOAD_PARAMS); @@ -148,12 +149,13 @@ void kds_s2000w_net_set_option_int(void** state) expect_function_call(__wrap_kds_s2000w_client_set_option); expect_function_call(__wrap_kds_s2000w_client_set_option); - sane_kds_s2000w_net_control_option(h, 15, SANE_ACTION_SET_VALUE, set_value, NULL); + SANE_Status status = sane_kds_s2000w_net_control_option(h, 15, SANE_ACTION_SET_VALUE, set_value, NULL); json_object* config = json_object_object_get(h->scanner_config, "Configuration"); json_object* value_object = json_object_object_get(config, FOREGROUND_BOLDNESS_AGGRESSIVENESS); const char* value = json_object_get_string(value_object); + assert_int_equal(status, SANE_STATUS_GOOD); assert_int_equal(value, 5); kds_s2000w_client_response_free(set_opt_resp);