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;
}
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;
}
}
/* 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 {
/* 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:
- /* 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' */