[ITC][Base-Utils][Non-ACR][TSAM-5385][Fixed Failed TC]
authorNibha Sharma <nibha.sharma@samsung.com>
Fri, 24 Jun 2016 04:30:53 +0000 (13:30 +0900)
committerNibha Sharma <nibha.sharma@samsung.com>
Fri, 24 Jun 2016 04:30:53 +0000 (13:30 +0900)
Change-Id: I8698eb8d49474cf95365fd2c57c0da218f442860
Signed-off-by: Nibha Sharma <nibha.sharma@samsung.com>
src/itc/base-utils/ITs-base-utils-unumber.c

index e31837a..3914f3a 100755 (executable)
@@ -474,6 +474,7 @@ int ITc_i18n_unumber_set_get_attribute_p(void)
 
        int nRetVal = -1;
        int nGetAttr = -1;
+       int nPadEnumVal = 1;
        i18n_unumber_format_attribute_e eUnumberFormatAttr[] = {I18N_UNUMBER_PARSE_INT_ONLY,                   
                                                                                                                        I18N_UNUMBER_GROUPING_USED,                   
                                                                                                                        I18N_UNUMBER_MAX_INTEGER_DIGITS,             
@@ -498,7 +499,11 @@ int ITc_i18n_unumber_set_get_attribute_p(void)
        {
                if(eUnumberFormatAttr[nIndex] == I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN){
                        nRetVal = i18n_unumber_set_attribute(num_format, eUnumberFormatAttr[nIndex], false); // As per developer request need to pass parameter as bool(true/false) instead of nIndex 
-               }else{
+               }
+               else if(eUnumberFormatAttr[nIndex] == I18N_UNUMBER_PADDING_POSITION){
+                       nRetVal = i18n_unumber_set_attribute(num_format, eUnumberFormatAttr[nIndex], nPadEnumVal);
+               }
+               else{
                        nRetVal = i18n_unumber_set_attribute(num_format, eUnumberFormatAttr[nIndex], nIndex);
                }
                
@@ -523,7 +528,15 @@ int ITc_i18n_unumber_set_get_attribute_p(void)
                                return 1;
                        }       
                        
-               }else {
+               }
+               else if(eUnumberFormatAttr[nIndex] == I18N_UNUMBER_PADDING_POSITION ){
+                       if(nGetAttr != nPadEnumVal ){
+                               FPRINTF("[Line : %d][%s]i18n_unumber_get_attribute failed for %s. Returned value not equal for I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN \\n", __LINE__, API_NAMESPACE, UnumberGetFormatAttr(eUnumberFormatAttr[nIndex]));
+                               return 1;
+                       }       
+                       
+               }
+               else {
                        if(nGetAttr != nIndex ){
                                FPRINTF("[Line : %d][%s]i18n_unumber_get_attribute failed for %s. Returned value not equal to set attribute\\n", __LINE__, API_NAMESPACE, UnumberGetFormatAttr(eUnumberFormatAttr[nIndex]));
                                return 1;