mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-06 22:15:31 +00:00
ICU-10995 Test formatting negative currency without minus sign (J)
X-SVN-Rev: 36383
This commit is contained in:
parent
300e531736
commit
823e3a9372
1 changed files with 11 additions and 1 deletions
|
@ -3721,5 +3721,15 @@ public class NumberFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void TestCurrFmtNegSameAsPositive() {
|
||||
DecimalFormatSymbols decfmtsym = DecimalFormatSymbols.getInstance(Locale.US);
|
||||
decfmtsym.setMinusSign('\u200B'); // ZERO WIDTH SPACE, in ICU4J cannot set to empty string
|
||||
DecimalFormat decfmt = new DecimalFormat("\u00A4#,##0.00;\u00A4#,##0.00", decfmtsym);
|
||||
String currFmtResult = decfmt.format(-100.0);
|
||||
if (!currFmtResult.equals("\u200B$100.00")) {
|
||||
errln("decfmt.toPattern results wrong, expected \u200B$100.00, got " + currFmtResult);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue