From f2ba4f70d0abf09650095dff4d3b8b5675cc4ca7 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sat, 25 Oct 2025 18:46:22 +0200 Subject: [PATCH] add tests status assert --- tests/kds_s2000w_net_set_opt_tests.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); -- 2.47.3