From: DongHun Kwak Date: Fri, 15 Apr 2022 07:32:48 +0000 (+0900) Subject: fix: fix invalid test logic X-Git-Tag: accepted/tizen/unified/20220530.140619^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fsandbox%2Fdh0128.kwak%2Fadd_testcase_20220415;p=platform%2Fcore%2Fapi%2Fbase-utils.git fix: fix invalid test logic - fix invalid test logic change i18n_utext_current32() to i18n_utext_next32() at utc_capi_base_utils_i18n_utext_next32_n change i18n_utext_current32() to i18n_utext_previous32 at utc_capi_base_utils_i18n_utext_previous32_n() Change-Id: I06ef18d5bb53d727e477e8082d56221e9141617d --- diff --git a/tests/utc-capi-base-utils-utext.c b/tests/utc-capi-base-utils-utext.c index d6242c1..0ceba19 100644 --- a/tests/utc-capi-base-utils-utext.c +++ b/tests/utc-capi-base-utils-utext.c @@ -22,26 +22,26 @@ static i18n_utext_h uta; static i18n_utext_h utb; /** -* @function utc_capi_base_utils_utext_startup -* @description Called before each test -* @parameter NA -* @return NA -*/ + * @function utc_capi_base_utils_utext_startup + * @description Called before each test + * @parameter NA + * @return NA + */ void utc_capi_base_utils_utext_startup(void) { } /** -* @function utc_capi_base_utils_utext_cleanup -* @description Called after each test -* @parameter NA -* @return NA -*/ + * @function utc_capi_base_utils_utext_cleanup + * @description Called after each test + * @parameter NA + * @return NA + */ void utc_capi_base_utils_utext_cleanup(void) { - if(uta != NULL) + if (uta != NULL) i18n_utext_destroy(uta); - if(utb != NULL) + if (utb != NULL) i18n_utext_destroy(utb); } @@ -82,7 +82,7 @@ int utc_capi_base_utils_i18n_utext_create_for_UTF8_n(void) */ int utc_capi_base_utils_i18n_utext_create_for_uchars_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); assert_eq(ret, I18N_ERROR_NONE); @@ -98,7 +98,7 @@ int utc_capi_base_utils_i18n_utext_create_for_uchars_p(void) */ int utc_capi_base_utils_i18n_utext_create_for_uchars_n(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC ret = i18n_utext_create_for_uchars(NULL, uString, -1, NULL); assert_eq(ret, I18N_ERROR_INVALID_PARAMETER); @@ -113,7 +113,7 @@ int utc_capi_base_utils_i18n_utext_create_for_uchars_n(void) */ int utc_capi_base_utils_i18n_utext_clone_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); assert_eq(ret, I18N_ERROR_NONE); @@ -133,7 +133,7 @@ int utc_capi_base_utils_i18n_utext_clone_p(void) */ int utc_capi_base_utils_i18n_utext_clone_n(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); assert_eq(ret, I18N_ERROR_NONE); @@ -151,7 +151,7 @@ int utc_capi_base_utils_i18n_utext_clone_n(void) */ int utc_capi_base_utils_i18n_utext_equals_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); assert_eq(ret, I18N_ERROR_NONE); ret = i18n_utext_create_for_uchars(NULL, uString, -1, &utb); @@ -170,7 +170,7 @@ int utc_capi_base_utils_i18n_utext_equals_p(void) */ int utc_capi_base_utils_i18n_utext_equals_n(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); assert_eq(ret, I18N_ERROR_NONE); ret = i18n_utext_create_for_uchars(NULL, uString, -1, &utb); @@ -201,7 +201,7 @@ int utc_capi_base_utils_i18n_utext_equals_n(void) */ int utc_capi_base_utils_i18n_utext_native_length_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC int64_t len; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); @@ -237,7 +237,7 @@ int utc_capi_base_utils_i18n_utext_native_length_n(void) */ int utc_capi_base_utils_i18n_utext_is_length_expensive_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC i18n_ubool b; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); @@ -270,7 +270,7 @@ int utc_capi_base_utils_i18n_utext_is_length_expensive_n(void) */ int utc_capi_base_utils_i18n_utext_char32_at_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC i18n_uchar32 c; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); @@ -303,7 +303,7 @@ int utc_capi_base_utils_i18n_utext_char32_at_n(void) */ int utc_capi_base_utils_i18n_utext_current32_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC i18n_uchar32 c; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); @@ -336,7 +336,7 @@ int utc_capi_base_utils_i18n_utext_current32_n(void) */ int utc_capi_base_utils_i18n_utext_next32_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC i18n_uchar32 c; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); @@ -357,7 +357,7 @@ int utc_capi_base_utils_i18n_utext_next32_p(void) */ int utc_capi_base_utils_i18n_utext_next32_n(void) { - i18n_utext_current32(NULL); + i18n_utext_next32(NULL); ret = get_last_result(); assert_eq(ret, I18N_ERROR_INVALID_PARAMETER); @@ -371,7 +371,7 @@ int utc_capi_base_utils_i18n_utext_next32_n(void) */ int utc_capi_base_utils_i18n_utext_previous32_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC i18n_uchar32 c; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); @@ -393,7 +393,7 @@ int utc_capi_base_utils_i18n_utext_previous32_p(void) */ int utc_capi_base_utils_i18n_utext_previous32_n(void) { - i18n_utext_current32(NULL); + i18n_utext_previous32(NULL); ret = get_last_result(); assert_eq(ret, I18N_ERROR_INVALID_PARAMETER); @@ -407,7 +407,7 @@ int utc_capi_base_utils_i18n_utext_previous32_n(void) */ int utc_capi_base_utils_i18n_utext_next32_from_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC i18n_uchar32 c; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); @@ -440,7 +440,7 @@ int utc_capi_base_utils_i18n_utext_next32_from_n(void) */ int utc_capi_base_utils_i18n_utext_previous32_from_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC i18n_uchar32 c; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); @@ -464,7 +464,6 @@ int utc_capi_base_utils_i18n_utext_previous32_from_n(void) assert_eq(ret, I18N_ERROR_INVALID_PARAMETER); return 0; - } /** @@ -474,7 +473,7 @@ int utc_capi_base_utils_i18n_utext_previous32_from_n(void) */ int utc_capi_base_utils_i18n_utext_set_get_native_index_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC int64_t i; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); @@ -523,7 +522,7 @@ int utc_capi_base_utils_i18n_utext_get_native_index_n(void) */ int utc_capi_base_utils_i18n_utext_move_index32_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC i18n_ubool b; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); @@ -558,7 +557,7 @@ int utc_capi_base_utils_i18n_utext_move_index32_n1(void) */ int utc_capi_base_utils_i18n_utext_get_previous_native_index_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC int64_t i; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); @@ -593,7 +592,7 @@ int utc_capi_base_utils_i18n_utext_get_previous_native_index_n(void) */ int utc_capi_base_utils_i18n_utext_extract_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC int32_t len; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); @@ -615,7 +614,7 @@ int utc_capi_base_utils_i18n_utext_extract_p(void) */ int utc_capi_base_utils_i18n_utext_extract_n(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC int32_t len; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); @@ -634,7 +633,7 @@ int utc_capi_base_utils_i18n_utext_extract_n(void) */ int utc_capi_base_utils_i18n_utext_is_writable_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC i18n_ubool b; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); @@ -669,7 +668,7 @@ int utc_capi_base_utils_i18n_utext_is_writable_n(void) */ int utc_capi_base_utils_i18n_utext_has_meta_data_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC i18n_ubool b; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); @@ -703,7 +702,7 @@ int utc_capi_base_utils_i18n_utext_has_meta_data_n(void) */ int utc_capi_base_utils_i18n_utext_replace_n(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC int32_t number; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); @@ -722,7 +721,7 @@ int utc_capi_base_utils_i18n_utext_replace_n(void) */ int utc_capi_base_utils_i18n_utext_copy_n(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta); assert_eq(ret, I18N_ERROR_NONE); @@ -740,7 +739,7 @@ int utc_capi_base_utils_i18n_utext_copy_n(void) */ int utc_capi_base_utils_i18n_utext_freeze_p(void) { - i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; //ABC + i18n_uchar uString[] = {0x41, 0x42, 0x43, 0}; // ABC i18n_ubool b; ret = i18n_utext_create_for_uchars(NULL, uString, -1, &uta);