From a23e65460707c734a0561ecf48a30852db11072c Mon Sep 17 00:00:00 2001 From: "jinwang.an" Date: Wed, 1 Apr 2020 15:32:37 +0900 Subject: [PATCH] Fix font type change test in unit test code. Change-Id: I79dfe2d21f3efa88098ae494b21e1ac192db5383 Signed-off-by: jinwang.an --- unit_test/src/unit_test.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/unit_test/src/unit_test.c b/unit_test/src/unit_test.c index f0efeae..f6a7631 100644 --- a/unit_test/src/unit_test.c +++ b/unit_test/src/unit_test.c @@ -1645,9 +1645,13 @@ RETTYPE utc_system_settings_set_value_string_n4(void) ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_FONT_TYPE, wrong_font_name); assert(ret != SYSTEM_SETTINGS_ERROR_NONE); + char *font_name_set = "BreezeSans"; + ret = system_settings_set_value_string(SYSTEM_SETTINGS_KEY_FONT_TYPE, font_name_set); + assert_eq(ret, SYSTEM_SETTINGS_ERROR_NONE); + char *font_name = NULL; ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_FONT_TYPE, &font_name); - //assert_eq(ret, SYSTEM_SETTINGS_ERROR_NONE); + assert_eq(ret, SYSTEM_SETTINGS_ERROR_NONE); free(font_name); RETURN(0); } @@ -3088,7 +3092,7 @@ void unittest_api() add_test_func("/utc_system_settings_get_value_int_p4", utc_system_settings_get_value_int_p4); g_test_add_func("/utc_system_settings_set_value_string_n2", utc_system_settings_set_value_string_n2); g_test_add_func("/utc_system_settings_set_value_string_n3", utc_system_settings_set_value_string_n3); - add_test_func("/utc_system_settings_set_value_string_n4", utc_system_settings_set_value_string_n4); + g_test_add_func("/utc_system_settings_set_value_string_n4", utc_system_settings_set_value_string_n4); add_test_func("/utc_system_settings_set_value_string_n5", utc_system_settings_set_value_string_n5); g_test_add_func("/utc_system_settings_set_value_string_n7", utc_system_settings_set_value_string_n7); add_test_func("/utc_system_settings_set_value_string_n8", utc_system_settings_set_value_string_n8); -- 2.7.4