ICU-13148 Adding test for grouping separator symbols override.
X-SVN-Rev: 41286
This commit is contained in:
parent
6545bac22d
commit
fb8f77b512
@ -6096,4 +6096,15 @@ public class NumberFormatTest extends TestFmwk {
|
||||
result.doubleValue());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test13148_GroupingSeparatorOverride() throws Exception {
|
||||
DecimalFormat fmt = (DecimalFormat)NumberFormat.getInstance(new ULocale("en", "ZA"));
|
||||
DecimalFormatSymbols symbols = fmt.getDecimalFormatSymbols();
|
||||
symbols.setDecimalSeparator('.');
|
||||
symbols.setGroupingSeparator(',');
|
||||
fmt.setDecimalFormatSymbols(symbols);
|
||||
Number number = fmt.parse("300,000");
|
||||
assertEquals("Should use custom symbols and not monetary symbols", 300000L, number);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user