ICU-3688 Fix UNUM_SECONDARY_GROUPING_SIZE

X-SVN-Rev: 16044
This commit is contained in:
George Rhoten 2004-07-18 10:22:23 +00:00
parent a8c47516eb
commit 37c5efea11
2 changed files with 13 additions and 1 deletions

View File

@ -441,11 +441,14 @@ unum_getAttribute(const UNumberFormat* fmt,
case UNUM_FORMAT_WIDTH:
return df->getFormatWidth();
/** The position at which padding will take place. */
case UNUM_PADDING_POSITION:
return df->getPadPosition();
case UNUM_SECONDARY_GROUPING_SIZE:
return df->getSecondaryGroupingSize();
default:
/* enums out of sync? unsupported enum? */
break;
}
} else {

View File

@ -674,6 +674,15 @@ free(result);
else
log_verbose("Pass:setting and getting attributes for UNUM_MULTIPLIER works fine\n");
attr=UNUM_SECONDARY_GROUPING_SIZE;
newvalue=unum_getAttribute(def, attr);
newvalue=2;
unum_setAttribute(def, attr, newvalue);
if(unum_getAttribute(def,attr) != 2)
log_err("error in setting and getting attributes for UNUM_SECONDARY_GROUPING_SIZE\n");
else
log_verbose("Pass:setting and getting attributes for UNUM_SECONDARY_GROUPING_SIZE works fine\n");
/*testing set and get Attributes extensively */
log_verbose("\nTesting get and set attributes extensively\n");
for(attr=UNUM_PARSE_INT_ONLY; attr<= UNUM_PADDING_POSITION; attr=(UNumberFormatAttribute)((int32_t)attr + 1) )