ICU-20186 Adding test for leading and trailing spaces in DecimalFormat.
This commit is contained in:
parent
00b360227b
commit
bb2b390b87
@ -411,6 +411,10 @@ void NumberFormatTest::Test20186_SpacesAroundSemicolon() {
|
||||
df = DecimalFormat(u"0.00;0.00", {"en-us", status}, status);
|
||||
expect2(df, 1, u"1.00");
|
||||
expect(df, -1, u"1.00"); // parses as 1, not -1
|
||||
|
||||
df = DecimalFormat(u" 0.00 ; -0.00 ", {"en-us", status}, status);
|
||||
expect2(df, 1, u" 1.00 ");
|
||||
expect2(df, -1, u" -1.00 ");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -270,6 +270,10 @@ public class NumberFormatTest extends TestFmwk {
|
||||
df = new DecimalFormat("0.00;0.00");
|
||||
expect2(df, 1, "1.00");
|
||||
expect(df, -1, "1.00"); // parses as 1, not -1
|
||||
|
||||
df = new DecimalFormat(" 0.00 ; -0.00 ");
|
||||
expect2(df, 1, " 1.00 ");
|
||||
expect2(df, -1, " -1.00 ");
|
||||
}
|
||||
|
||||
// Test exponential pattern
|
||||
|
Loading…
Reference in New Issue
Block a user