ICU-5566 Fix tests broken by new ICU data from CLDR
X-SVN-Rev: 21187
This commit is contained in:
parent
be09d59ab1
commit
3283e8ee8f
@ -1099,7 +1099,8 @@ public class GlobalizationPreferencesTest extends TestFmwk {
|
|||||||
|
|
||||||
logln("Currency symbol[USD]: " + name1 + " | " + name2 + " | " + name3);
|
logln("Currency symbol[USD]: " + name1 + " | " + name2 + " | " + name3);
|
||||||
String dollar = "$";
|
String dollar = "$";
|
||||||
if (!name1.equals(dollar) || !name2.equals(dollar) || !name3.equals(dollar)) {
|
String us_dollar = "US$";
|
||||||
|
if (!name1.equals(dollar) || !name2.equals(us_dollar) || !name3.equals(us_dollar)) {
|
||||||
errln("FAIL: Currency symbol ID");
|
errln("FAIL: Currency symbol ID");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,13 +309,13 @@ public class NumberFormatTest extends com.ibm.icu.dev.test.TestFmwk {
|
|||||||
expectCurrency(fmt, null, 1234.56, "1 234,56 \u20AC");
|
expectCurrency(fmt, null, 1234.56, "1 234,56 \u20AC");
|
||||||
|
|
||||||
expectCurrency(fmt, Currency.getInstance(Locale.JAPAN),
|
expectCurrency(fmt, Currency.getInstance(Locale.JAPAN),
|
||||||
1234.56, "1 235 \u00A5"); // Yen
|
1234.56, "1 235 JP\u00A5"); // Yen
|
||||||
|
|
||||||
expectCurrency(fmt, Currency.getInstance(new Locale("fr", "CH", "")),
|
expectCurrency(fmt, Currency.getInstance(new Locale("fr", "CH", "")),
|
||||||
1234.56, "1 234,55 sFr."); // 0.25 rounding
|
1234.56, "1 234,55 sFr."); // 0.25 rounding
|
||||||
|
|
||||||
expectCurrency(fmt, Currency.getInstance(Locale.US),
|
expectCurrency(fmt, Currency.getInstance(Locale.US),
|
||||||
1234.56, "1 234,56 $");
|
1234.56, "1 234,56 US$");
|
||||||
|
|
||||||
expectCurrency(fmt, Currency.getInstance(Locale.FRANCE),
|
expectCurrency(fmt, Currency.getInstance(Locale.FRANCE),
|
||||||
1234.56, "1 234,56 \u20AC"); // Euro
|
1234.56, "1 234,56 \u20AC"); // Euro
|
||||||
|
@ -417,8 +417,9 @@ public class TestMessageFormat extends com.ibm.icu.dev.test.TestFmwk {
|
|||||||
// Just use unlocalized currency symbol.
|
// Just use unlocalized currency symbol.
|
||||||
//String compareStrGer = "At <time> on 08.08.1997, you made a deposit of 456,83 DM.";
|
//String compareStrGer = "At <time> on 08.08.1997, you made a deposit of 456,83 DM.";
|
||||||
String compareStrGer = "At <time> on 08.08.1997, you made a deposit of ";
|
String compareStrGer = "At <time> on 08.08.1997, you made a deposit of ";
|
||||||
|
compareStrGer += "456,83 ";
|
||||||
compareStrGer += '\u00a4';
|
compareStrGer += '\u00a4';
|
||||||
compareStrGer += " 456,83.";
|
compareStrGer += ".";
|
||||||
|
|
||||||
MessageFormat msg = new MessageFormat(formatStr, Locale.ENGLISH);
|
MessageFormat msg = new MessageFormat(formatStr, Locale.ENGLISH);
|
||||||
result.setLength(0);
|
result.setLength(0);
|
||||||
@ -851,8 +852,9 @@ public class TestMessageFormat extends com.ibm.icu.dev.test.TestFmwk {
|
|||||||
compareStr2 += "456.83.";
|
compareStr2 += "456.83.";
|
||||||
// both date and currency formats are German-style
|
// both date and currency formats are German-style
|
||||||
String compareStr3 = "At <time> on 08.08.1997, you made a deposit of ";
|
String compareStr3 = "At <time> on 08.08.1997, you made a deposit of ";
|
||||||
|
compareStr3 += "456,83 ";
|
||||||
compareStr3 += '\u00a4';
|
compareStr3 += '\u00a4';
|
||||||
compareStr3 += " 456,83.";
|
compareStr3 += ".";
|
||||||
|
|
||||||
MessageFormat msg = new MessageFormat(formatStr, ULocale.US);
|
MessageFormat msg = new MessageFormat(formatStr, ULocale.US);
|
||||||
result.setLength(0);
|
result.setLength(0);
|
||||||
|
@ -366,6 +366,7 @@ public class TestUScript extends TestFmwk {
|
|||||||
"Plrd", "Roro", "Sara", "Syre", "Syrj", "Syrn", "Teng", "Vaii", "Visp", "Cuneiform",
|
"Plrd", "Roro", "Sara", "Syre", "Syrj", "Syrn", "Teng", "Vaii", "Visp", "Cuneiform",
|
||||||
"Zxxx", "Unknown",
|
"Zxxx", "Unknown",
|
||||||
"Cari", "Jpan", "Lana", "Lyci", "Lydi", "Olck", "Rjng", "Saur", "Sgnw", "Sund",
|
"Cari", "Jpan", "Lana", "Lyci", "Lydi", "Olck", "Rjng", "Saur", "Sgnw", "Sund",
|
||||||
|
"Moon", "Mtei",
|
||||||
};
|
};
|
||||||
String[] expectedShort = new String[]{
|
String[] expectedShort = new String[]{
|
||||||
"Bali", "Batk", "Blis", "Brah", "Cham", "Cirt", "Cyrs", "Egyd", "Egyh", "Egyp",
|
"Bali", "Batk", "Blis", "Brah", "Cham", "Cirt", "Cyrs", "Egyd", "Egyh", "Egyp",
|
||||||
@ -374,6 +375,7 @@ public class TestUScript extends TestFmwk {
|
|||||||
"Plrd", "Roro", "Sara", "Syre", "Syrj", "Syrn", "Teng", "Vaii", "Visp", "Xsux",
|
"Plrd", "Roro", "Sara", "Syre", "Syrj", "Syrn", "Teng", "Vaii", "Visp", "Xsux",
|
||||||
"Zxxx", "Zzzz",
|
"Zxxx", "Zzzz",
|
||||||
"Cari", "Jpan", "Lana", "Lyci", "Lydi", "Olck", "Rjng", "Saur", "Sgnw", "Sund",
|
"Cari", "Jpan", "Lana", "Lyci", "Lydi", "Olck", "Rjng", "Saur", "Sgnw", "Sund",
|
||||||
|
"Moon", "Mtei",
|
||||||
};
|
};
|
||||||
int j = 0;
|
int j = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
@ -385,7 +385,7 @@ public class TimeZoneTest extends TestFmwk
|
|||||||
}
|
}
|
||||||
// dlf - we will use generic time, or if unavailable, GMT for standard time in the zone
|
// dlf - we will use generic time, or if unavailable, GMT for standard time in the zone
|
||||||
// - we now (3.4.1) have localizations for this zone, so change test string
|
// - we now (3.4.1) have localizations for this zone, so change test string
|
||||||
else if(!name.equals("Los Angeles (Stati Uniti)") &&
|
else if(!name.equals("Stati Uniti (Los Angeles)") &&
|
||||||
!name.equals("GMT-08:00") &&
|
!name.equals("GMT-08:00") &&
|
||||||
!name.equals("GMT-8:00") &&
|
!name.equals("GMT-8:00") &&
|
||||||
!name.equals("GMT-0800") &&
|
!name.equals("GMT-0800") &&
|
||||||
|
@ -142,7 +142,7 @@ public class CurrencyTest extends TestFmwk {
|
|||||||
// THE LOCALE DATA before diving into the code.
|
// THE LOCALE DATA before diving into the code.
|
||||||
if (!noData()) {
|
if (!noData()) {
|
||||||
assertEquals("USD.getName(SYMBOL_NAME)",
|
assertEquals("USD.getName(SYMBOL_NAME)",
|
||||||
"US$",
|
"$",
|
||||||
usd.getName(en, Currency.SYMBOL_NAME, isChoiceFormat));
|
usd.getName(en, Currency.SYMBOL_NAME, isChoiceFormat));
|
||||||
assertEquals("USD.getName(LONG_NAME)",
|
assertEquals("USD.getName(LONG_NAME)",
|
||||||
"US Dollar",
|
"US Dollar",
|
||||||
|
@ -850,12 +850,13 @@ public final class ICUResourceBundleTest extends TestFmwk {
|
|||||||
try {
|
try {
|
||||||
ICUResourceBundle root =(ICUResourceBundle) UResourceBundle.getBundleInstance(ICUResourceBundle.ICU_BASE_NAME, "root");
|
ICUResourceBundle root =(ICUResourceBundle) UResourceBundle.getBundleInstance(ICUResourceBundle.ICU_BASE_NAME, "root");
|
||||||
ICUResourceBundle t = null;
|
ICUResourceBundle t = null;
|
||||||
try{
|
// AmPmMarkers now exist in root/islamic calendar, so this test is rendered useless.
|
||||||
t = root.getWithFallback("calendar/islamic-civil/AmPmMarkers");
|
// try{
|
||||||
errln("Second resource does not exist. How did it get here?\n");
|
// t = root.getWithFallback("calendar/islamic-civil/AmPmMarkers");
|
||||||
}catch(MissingResourceException ex){
|
// errln("Second resource does not exist. How did it get here?\n");
|
||||||
logln("Got the expected exception");
|
// }catch(MissingResourceException ex){
|
||||||
}
|
// logln("Got the expected exception");
|
||||||
|
// }
|
||||||
try{
|
try{
|
||||||
t = root.getWithFallback("calendar/islamic-civil/eras/abbreviated/0/mikimaus/pera");
|
t = root.getWithFallback("calendar/islamic-civil/eras/abbreviated/0/mikimaus/pera");
|
||||||
errln("Second resource does not exist. How did it get here?\n");
|
errln("Second resource does not exist. How did it get here?\n");
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:d1d5b564adaac719053b32a88f7f36d37eff64f3c789a267d73f0d17acb74ac5
|
oid sha256:4a32680b5a2a62defea26ab6e1872245a01ed2822e613f4428aa20aa9975cb7e
|
||||||
size 5169539
|
size 5170451
|
||||||
|
Loading…
Reference in New Issue
Block a user