parent
3a6c706388
commit
2f0ff0e601
@ -5034,6 +5034,19 @@ public class NumberFormatTest extends TestFmwk {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void Test13148() {
|
||||
if (logKnownIssue("13148", "Currency separators used in non-currency parsing")) return;
|
||||
DecimalFormat fmt = (DecimalFormat)NumberFormat.getInstance(new ULocale("en", "ZA"));
|
||||
DecimalFormatSymbols symbols = fmt.getDecimalFormatSymbols();
|
||||
symbols.setDecimalSeparator('.');
|
||||
symbols.setGroupingSeparator(',');
|
||||
fmt.setDecimalFormatSymbols(symbols);
|
||||
ParsePosition ppos = new ParsePosition(0);
|
||||
Number number = fmt.parse("300,000", ppos);
|
||||
assertEquals("Should parse to 300000 using non-monetary separators: " + ppos, 300000L, number);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPercentZero() {
|
||||
DecimalFormat df = (DecimalFormat) NumberFormat.getPercentInstance();
|
||||
|
Loading…
Reference in New Issue
Block a user