]> granicus.if.org Git - icu/commitdiff
ICU-9613 Fix wrong enum name
authorMichael Ow <mow@svn.icu-project.org>
Fri, 12 Oct 2012 21:53:41 +0000 (21:53 +0000)
committerMichael Ow <mow@svn.icu-project.org>
Fri, 12 Oct 2012 21:53:41 +0000 (21:53 +0000)
X-SVN-Rev: 32625

icu4c/source/i18n/decimfmt.cpp
icu4c/source/test/cintltst/cnumtst.c

index e1e0d05be4ea786a7e12eff453ea928a93ae6efc..26f2c653f10d5db8e5a95cea382576a256c5d418 100644 (file)
@@ -1137,7 +1137,7 @@ DecimalFormat::_format(int64_t number,
     int32_t maxIntDig = getMaximumIntegerDigits();
     int32_t destlength = length<=maxIntDig?length:maxIntDig; // dest length pinned to max int digits
 
-    if(length>maxIntDig && fBoolFlags.contains(UNUM_FORMAT_FAIL_IF_MAX_DIGITS)) {
+    if(length>maxIntDig && fBoolFlags.contains(UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS)) {
       status = U_ILLEGAL_ARGUMENT_ERROR;
     }
 
@@ -1661,7 +1661,7 @@ DecimalFormat::subformat(UnicodeString& appendTo,
         if (count > maxIntDig && maxIntDig >= 0) {
             count = maxIntDig;
             digitIndex = digits.getDecimalAt() - count;
-            if(fBoolFlags.contains(UNUM_FORMAT_FAIL_IF_MAX_DIGITS)) {
+            if(fBoolFlags.contains(UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS)) {
                 status = U_ILLEGAL_ARGUMENT_ERROR;
             }
         }
@@ -5443,7 +5443,7 @@ DecimalFormat& DecimalFormat::setAttribute( UNumberFormatAttribute attr,
 
     /* These are stored in fBoolFlags */
     case UNUM_PARSE_NO_EXPONENT:
-    case UNUM_FORMAT_FAIL_IF_MAX_DIGITS:
+    case UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS:
       if(!fBoolFlags.isValidValue(newValue)) {
           status = U_ILLEGAL_ARGUMENT_ERROR;
       } else {
@@ -5523,7 +5523,7 @@ int32_t DecimalFormat::getAttribute( UNumberFormatAttribute attr,
         
     /* These are stored in fBoolFlags */
     case UNUM_PARSE_NO_EXPONENT:
-    case UNUM_FORMAT_FAIL_IF_MAX_DIGITS:
+    case UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS:
       return fBoolFlags.get(attr);
 
     default:
index 71adcad80f741a3c21b9e4ab253ae06ddba10724..358b0c7c3b2d242f619148a86f894be12871237d 100644 (file)
@@ -2175,12 +2175,12 @@ static void TestMaxInt(void) {
 
 
 
-    /* test UNUM_FORMAT_FAIL_IF_MAX_DIGITS */
-    ASSERT_TRUE(unum_getAttribute(fmt, UNUM_FORMAT_FAIL_IF_MAX_DIGITS)==0);
+    /* test UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS */
+    ASSERT_TRUE(unum_getAttribute(fmt, UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS)==0);
 
-    unum_setAttribute(fmt, UNUM_FORMAT_FAIL_IF_MAX_DIGITS, 1);
-    /* test UNUM_FORMAT_FAIL_IF_MAX_DIGITS */
-    ASSERT_TRUE(unum_getAttribute(fmt, UNUM_FORMAT_FAIL_IF_MAX_DIGITS)==1);
+    unum_setAttribute(fmt, UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS, 1);
+    /* test UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS */
+    ASSERT_TRUE(unum_getAttribute(fmt, UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS)==1);
 
     status = U_ZERO_ERROR;
     /* max int digits still '2' */