[TCT][Non-ACR][base-utils][ITC][Fix test case for ICU both 65.1 and 67.1] 94/254594/1
authorJinWang An <jinwang.an@samsung.com>
Fri, 5 Mar 2021 03:22:14 +0000 (12:22 +0900)
committerJinWang An <jinwang.an@samsung.com>
Fri, 5 Mar 2021 03:22:14 +0000 (12:22 +0900)
Change-Id: Iff09fe65bafa1ec784a3c3f55c53a7986e028a65
Signed-off-by: JinWang An <jinwang.an@samsung.com>
src/itc/base-utils/ITs-base-utils-measure-unit.c

index 78f492c6d2439044f153c4d2ed1cc9c13134a688..2e6d7e3f8400ce1bfdbdfebf5a400c690dd16a1a 100755 (executable)
@@ -354,7 +354,8 @@ int ITc_i18n_measure_unit_create_meter_per_second_squared_p(void)
 
        i18n_measure_unit_h hMeasureUnit = NULL;
        const char *pRefType = "acceleration";
-    const char *pRefSubtype = "meter-per-square-second";
+    const char *pRefSubtype_latest = "meter-per-square-second";
+    const char *pRefSubtype_old = "meter-per-second-squared";
        char *pSubtype = NULL;
        char *type = NULL;
 
@@ -376,7 +377,8 @@ int ITc_i18n_measure_unit_create_meter_per_second_squared_p(void)
 
        nRet = i18n_measure_unit_get_subtype(hMeasureUnit, &pSubtype);
        PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRet, "i18n_measure_unit_get_subtype", BaseUtilsGetError(nRet),i18n_measure_unit_destroy(hMeasureUnit));
-       if(strcmp(pSubtype, pRefSubtype) !=0 )
+       if(strcmp(pSubtype, pRefSubtype_latest) != 0
+                               && strcmp(pSubtype, pRefSubtype_old) !=0)
        {
                FPRINTF("\\n[Line : %d][%s] pSubtype is not set as pRefSubtype\\n", __LINE__, API_NAMESPACE);
                i18n_measure_unit_destroy(hMeasureUnit);
@@ -5488,7 +5490,8 @@ int ITc_i18n_measure_unit_create_inch_hg_p(void)
 
        i18n_measure_unit_h hMeasureUnit = NULL;
        const char *pRefType = "pressure";
-    const char *pRefSubtype = "inch-ofhg";
+    const char *pRefSubtype_latest = "inch-ofhg";
+    const char *pRefSubtype_old = "inch-hg";
        char *pSubtype = NULL;
        char *type = NULL;
 
@@ -5510,7 +5513,8 @@ int ITc_i18n_measure_unit_create_inch_hg_p(void)
 
        nRet = i18n_measure_unit_get_subtype(hMeasureUnit, &pSubtype);
        PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRet, "i18n_measure_unit_get_subtype", BaseUtilsGetError(nRet),i18n_measure_unit_destroy(hMeasureUnit));
-       if(strcmp(pSubtype, pRefSubtype) != 0 )
+       if(strcmp(pSubtype, pRefSubtype_latest) != 0
+                               && strcmp(pSubtype, pRefSubtype_old) !=0)
        {
                FPRINTF("\\n[Line : %d][%s] pSubtype is not set as pRefSubtype\\n", __LINE__, API_NAMESPACE);
                i18n_measure_unit_destroy(hMeasureUnit);
@@ -5606,7 +5610,8 @@ int ITc_i18n_measure_unit_create_millimeter_of_mercury_p(void)
 
        i18n_measure_unit_h hMeasureUnit = NULL;
        const char *pRefType = "pressure";
-    const char *pRefSubtype = "millimeter-ofhg";
+    const char *pRefSubtype_latest = "millimeter-ofhg";
+    const char *pRefSubtype_old = "millimeter-of-mercury";
        char *pSubtype = NULL;
        char *type = NULL;
 
@@ -5628,7 +5633,8 @@ int ITc_i18n_measure_unit_create_millimeter_of_mercury_p(void)
 
        nRet = i18n_measure_unit_get_subtype(hMeasureUnit, &pSubtype);
        PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRet, "i18n_measure_unit_get_subtype", BaseUtilsGetError(nRet),i18n_measure_unit_destroy(hMeasureUnit));
-       if(strcmp(pSubtype, pRefSubtype) != 0 )
+       if(strcmp(pSubtype, pRefSubtype_latest) != 0
+                               && strcmp(pSubtype, pRefSubtype_old) !=0)
        {
                FPRINTF("\\n[Line : %d][%s] pSubtype is not set as pRefSubtype\\n", __LINE__, API_NAMESPACE);
                i18n_measure_unit_destroy(hMeasureUnit);
@@ -5665,7 +5671,8 @@ int ITc_i18n_measure_unit_create_pound_per_square_inch_p(void)
 
        i18n_measure_unit_h hMeasureUnit = NULL;
        const char *pRefType = "pressure";
-    const char *pRefSubtype = "pound-force-per-square-inch";
+    const char *pRefSubtype_latest = "pound-force-per-square-inch";
+    const char *pRefSubtype_old = "pound-per-square-inch";
        char *pSubtype = NULL;
        char *type = NULL;
 
@@ -5687,7 +5694,8 @@ int ITc_i18n_measure_unit_create_pound_per_square_inch_p(void)
 
        nRet = i18n_measure_unit_get_subtype(hMeasureUnit, &pSubtype);
        PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRet, "i18n_measure_unit_get_subtype", BaseUtilsGetError(nRet),i18n_measure_unit_destroy(hMeasureUnit));
-       if(strcmp(pSubtype, pRefSubtype) != 0 )
+       if(strcmp(pSubtype, pRefSubtype_latest) != 0
+                               && strcmp(pSubtype, pRefSubtype_old) !=0)
        {
                FPRINTF("\\n[Line : %d][%s] pSubtype is not set as pRefSubtype\\n", __LINE__, API_NAMESPACE);
                i18n_measure_unit_destroy(hMeasureUnit);