ICU-13162 Fixing test for #13088 to be independent of the locale data.

X-SVN-Rev: 40073
This commit is contained in:
Shane Carr 2017-04-22 05:42:39 +00:00
parent 7c633a5a7a
commit 98c83c3a7d

View File

@ -4987,8 +4987,14 @@ public class NumberFormatTest extends TestFmwk {
@Test
public void Test13088() {
ULocale loc = new ULocale("fa");
String pattern = "%\u00A0#,##0;%\u00A0-#,##0";
double num = -12.34;
NumberFormat numfmt = NumberFormat.getPercentInstance(loc);
DecimalFormatSymbols symbols = DecimalFormatSymbols.getInstance(loc);
// If the symbols ever change in locale data, please call the setters so that this test
// continues to use the old symbols.
assertEquals("Checking for expected symbols", "", symbols.getMinusSignString());
assertEquals("Checking for expected symbols", "‎٪", symbols.getPercentString());
DecimalFormat numfmt = new DecimalFormat(pattern, symbols);
expect2(numfmt, num, "‎٪ ‎−۱٬۲۳۴");
}