ICU-5566 Fix tests broken by new ICU data from CLDR

X-SVN-Rev: 21187
This commit is contained in:
John Emmons 2007-03-08 05:05:00 +00:00
parent be09d59ab1
commit 3283e8ee8f
8 changed files with 21 additions and 15 deletions

View File

@ -1099,7 +1099,8 @@ public class GlobalizationPreferencesTest extends TestFmwk {
logln("Currency symbol[USD]: " + name1 + " | " + name2 + " | " + name3);
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");
}

View File

@ -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, 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", "")),
1234.56, "1 234,55 sFr."); // 0.25 rounding
expectCurrency(fmt, Currency.getInstance(Locale.US),
1234.56, "1 234,56 $");
1234.56, "1 234,56 US$");
expectCurrency(fmt, Currency.getInstance(Locale.FRANCE),
1234.56, "1 234,56 \u20AC"); // Euro

View File

@ -417,8 +417,9 @@ public class TestMessageFormat extends com.ibm.icu.dev.test.TestFmwk {
// 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 ";
compareStrGer += "456,83 ";
compareStrGer += '\u00a4';
compareStrGer += " 456,83.";
compareStrGer += ".";
MessageFormat msg = new MessageFormat(formatStr, Locale.ENGLISH);
result.setLength(0);
@ -851,8 +852,9 @@ public class TestMessageFormat extends com.ibm.icu.dev.test.TestFmwk {
compareStr2 += "456.83.";
// both date and currency formats are German-style
String compareStr3 = "At <time> on 08.08.1997, you made a deposit of ";
compareStr3 += "456,83 ";
compareStr3 += '\u00a4';
compareStr3 += " 456,83.";
compareStr3 += ".";
MessageFormat msg = new MessageFormat(formatStr, ULocale.US);
result.setLength(0);

View File

@ -366,6 +366,7 @@ public class TestUScript extends TestFmwk {
"Plrd", "Roro", "Sara", "Syre", "Syrj", "Syrn", "Teng", "Vaii", "Visp", "Cuneiform",
"Zxxx", "Unknown",
"Cari", "Jpan", "Lana", "Lyci", "Lydi", "Olck", "Rjng", "Saur", "Sgnw", "Sund",
"Moon", "Mtei",
};
String[] expectedShort = new String[]{
"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",
"Zxxx", "Zzzz",
"Cari", "Jpan", "Lana", "Lyci", "Lydi", "Olck", "Rjng", "Saur", "Sgnw", "Sund",
"Moon", "Mtei",
};
int j = 0;
int i = 0;

View File

@ -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
// - 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-8:00") &&
!name.equals("GMT-0800") &&

View File

@ -142,7 +142,7 @@ public class CurrencyTest extends TestFmwk {
// THE LOCALE DATA before diving into the code.
if (!noData()) {
assertEquals("USD.getName(SYMBOL_NAME)",
"US$",
"$",
usd.getName(en, Currency.SYMBOL_NAME, isChoiceFormat));
assertEquals("USD.getName(LONG_NAME)",
"US Dollar",

View File

@ -850,12 +850,13 @@ public final class ICUResourceBundleTest extends TestFmwk {
try {
ICUResourceBundle root =(ICUResourceBundle) UResourceBundle.getBundleInstance(ICUResourceBundle.ICU_BASE_NAME, "root");
ICUResourceBundle t = null;
try{
t = root.getWithFallback("calendar/islamic-civil/AmPmMarkers");
errln("Second resource does not exist. How did it get here?\n");
}catch(MissingResourceException ex){
logln("Got the expected exception");
}
// AmPmMarkers now exist in root/islamic calendar, so this test is rendered useless.
// try{
// t = root.getWithFallback("calendar/islamic-civil/AmPmMarkers");
// errln("Second resource does not exist. How did it get here?\n");
// }catch(MissingResourceException ex){
// logln("Got the expected exception");
// }
try{
t = root.getWithFallback("calendar/islamic-civil/eras/abbreviated/0/mikimaus/pera");
errln("Second resource does not exist. How did it get here?\n");

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d1d5b564adaac719053b32a88f7f36d37eff64f3c789a267d73f0d17acb74ac5
size 5169539
oid sha256:4a32680b5a2a62defea26ab6e1872245a01ed2822e613f4428aa20aa9975cb7e
size 5170451