From: JinWang An Date: Fri, 5 Mar 2021 02:27:14 +0000 (+0900) Subject: Fix measure-unit test src X-Git-Tag: accepted/tizen/unified/20210305.141711^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=82f202cd52a24861575974d45e50121806197f8d;p=platform%2Fcore%2Fapi%2Fbase-utils.git Fix measure-unit test src - check subtypes for icu both 65.1 and 67.1. Change-Id: Ia9dc2d1459a27f05542bb32409977024d08501bc Signed-off-by: JinWang An --- diff --git a/tests/utc-capi-base-utils-measure-unit.c b/tests/utc-capi-base-utils-measure-unit.c index 122fffb..3bce8e3 100644 --- a/tests/utc-capi-base-utils-measure-unit.c +++ b/tests/utc-capi-base-utils-measure-unit.c @@ -1317,10 +1317,11 @@ int utc_capi_base_utils_i18n_measure_unit_create_pound_per_square_inch_p(void) assert_eq(ret, I18N_ERROR_NONE); const char *ref_type = "pressure"; - const char *ref_subtype = "pound-force-per-square-inch"; + const char *ref_subtype_latest = "pound-force-per-square-inch"; + const char *ref_subtype_old = "pound-per-square-inch"; assert(!strcmp(type, ref_type)); - assert(!strcmp(subtype, ref_subtype)); + assert(!strcmp(subtype, ref_subtype_latest) || !strcmp(subtype, ref_subtype_old)); return 0; } @@ -1360,10 +1361,11 @@ int utc_capi_base_utils_i18n_measure_unit_create_millimeter_of_mercury_p(void) assert_eq(ret, I18N_ERROR_NONE); const char *ref_type = "pressure"; - const char *ref_subtype = "millimeter-ofhg"; + const char *ref_subtype_latest = "millimeter-ofhg"; + const char *ref_subtype_old = "millimeter-of-mercury"; assert(!strcmp(type, ref_type)); - assert(!strcmp(subtype, ref_subtype)); + assert(!strcmp(subtype, ref_subtype_latest) || !strcmp(subtype, ref_subtype_old)); return 0; } @@ -1446,10 +1448,11 @@ int utc_capi_base_utils_i18n_measure_unit_create_inch_hg_p(void) assert_eq(ret, I18N_ERROR_NONE); const char *ref_type = "pressure"; - const char *ref_subtype = "inch-ofhg"; + const char *ref_subtype_latest = "inch-ofhg"; + const char *ref_subtype_old = "inch-hg"; assert(!strcmp(type, ref_type)); - assert(!strcmp(subtype, ref_subtype)); + assert(!strcmp(subtype, ref_subtype_latest) || !strcmp(subtype, ref_subtype_old)); return 0; } @@ -5188,10 +5191,11 @@ int utc_capi_base_utils_i18n_measure_unit_create_meter_per_second_squared_p(void assert_eq(ret, I18N_ERROR_NONE); const char *ref_type = "acceleration"; - const char *ref_subtype = "meter-per-square-second"; + const char *ref_subtype_latest = "meter-per-square-second"; + const char *ref_subtype_old = "meter-per-second-squared"; assert(!strcmp(type, ref_type)); - assert(!strcmp(subtype, ref_subtype)); + assert(!strcmp(subtype, ref_subtype_latest) || !strcmp(subtype, ref_subtype_old)); return 0; }