ICU-8046 CLDR 1.9 integration pass 1, update J tests

X-SVN-Rev: 28874
This commit is contained in:
Peter Edberg 2010-10-19 19:26:22 +00:00
parent 396f2a8f3a
commit 1c7566e3db
7 changed files with 55 additions and 55 deletions

View file

@ -498,13 +498,13 @@ public class CollationAPITest extends TestFmwk {
"The default collation should be returned.");
Collator frCol = null;
try {
frCol = Collator.getInstance(Locale.FRANCE);
frCol = Collator.getInstance(Locale.CANADA_FRENCH);
} catch (Exception e) {
errln("Creating French collator failed.");
errln("Creating fr_CA collator failed.");
return;
}
doAssert(!(frCol.equals(junk)), "The junk is the same as the French collator.");
doAssert(!(frCol.equals(junk)), "The junk is the same as the fr_CA collator.");
logln("Collator property test ended.");
}

View file

@ -119,7 +119,7 @@ public class CollationFrenchTest extends TestFmwk{
}
protected void init()throws Exception{
myCollation = Collator.getInstance(Locale.FRENCH);
myCollation = Collator.getInstance(Locale.CANADA_FRENCH);
}
// perform tests with strength TERTIARY
@ -278,4 +278,4 @@ public class CollationFrenchTest extends TestFmwk{
target += "]";
return target;
}
}
}

View file

@ -401,9 +401,9 @@ public class CollationRegressionTest extends TestFmwk {
public void Test4062418(/* char* par */) {
RuleBasedCollator c = null;
try {
c = (RuleBasedCollator) Collator.getInstance(Locale.FRANCE);
c = (RuleBasedCollator) Collator.getInstance(Locale.CANADA_FRENCH);
} catch (Exception e) {
errln("Failed to create collator for Locale::FRANCE()");
errln("Failed to create collator for Locale.CANADA_FRENCH");
return;
}
c.setStrength(Collator.SECONDARY);
@ -457,9 +457,9 @@ public class CollationRegressionTest extends TestFmwk {
public void Test4066696(/* char* par */) {
RuleBasedCollator c = null;
try {
c = (RuleBasedCollator)Collator.getInstance(Locale.FRANCE);
c = (RuleBasedCollator)Collator.getInstance(Locale.CANADA_FRENCH);
} catch(Exception e) {
errln("Failure creating collator for Locale::getFrance()");
errln("Failure creating collator for Locale.CANADA_FRENCH");
return;
}
c.setStrength(Collator.SECONDARY);
@ -752,10 +752,10 @@ public class CollationRegressionTest extends TestFmwk {
public void Test4132736(/* char* par */) {
Collator c = null;
try {
c = Collator.getInstance(Locale.FRANCE);
c = Collator.getInstance(Locale.CANADA_FRENCH);
c.setStrength(Collator.TERTIARY);
} catch (Exception e) {
errln("Failed to create a collator for Locale::getFrance()");
errln("Failed to create a collator for Locale.CANADA_FRENCH");
}
String test1[] = {
@ -1194,4 +1194,4 @@ public class CollationRegressionTest extends TestFmwk {
return super.getCollationElementIterator(text);
}
}
*/
*/

View file

@ -341,21 +341,21 @@ public class CollationServiceTest extends TestFmwk {
boolean isAvailable[] = new boolean[1];
ULocale equiv = Collator.getFunctionalEquivalent(KW[0],
new ULocale("fr"),
new ULocale("de"),
isAvailable);
if (assertTrue("getFunctionalEquivalent(fr)!=null", equiv!=null)) {
assertEquals("getFunctionalEquivalent(fr)", "fr", equiv.toString());
if (assertTrue("getFunctionalEquivalent(de)!=null", equiv!=null)) {
assertEquals("getFunctionalEquivalent(de)", "de", equiv.toString());
}
assertTrue("getFunctionalEquivalent(fr).isAvailable==true",
assertTrue("getFunctionalEquivalent(de).isAvailable==true",
isAvailable[0] == true);
equiv = Collator.getFunctionalEquivalent(KW[0],
new ULocale("fr_FR"),
new ULocale("de_DE"),
isAvailable);
if (assertTrue("getFunctionalEquivalent(fr_FR)!=null", equiv!=null)) {
assertEquals("getFunctionalEquivalent(fr_FR)", "fr", equiv.toString());
if (assertTrue("getFunctionalEquivalent(de_DE)!=null", equiv!=null)) {
assertEquals("getFunctionalEquivalent(de_DE)", "de", equiv.toString());
}
assertTrue("getFunctionalEquivalent(fr_FR).isAvailable==true",
assertTrue("getFunctionalEquivalent(de_DE).isAvailable==true",
isAvailable[0] == true);
equiv = Collator.getFunctionalEquivalent(KW[0], new ULocale("zh_Hans"));
@ -444,22 +444,22 @@ public class CollationServiceTest extends TestFmwk {
public void TestGetKeywordValues(){
final String[][] PREFERRED = {
{"und", "standard", "search"},
{"en_US", "standard", "search"},
{"en_029", "standard", "search"},
{"de_DE", "standard", "phonebook", "search"},
{"de_Latn_DE", "standard", "phonebook", "search"},
{"zh", "pinyin", "big5han", "gb2312han", "standard", "stroke", "unihan", "search"},
{"zh_Hans", "pinyin", "big5han", "gb2312han", "standard", "stroke", "unihan", "search"},
{"zh_CN", "pinyin", "big5han", "gb2312han", "standard", "stroke", "unihan", "search"},
{"zh_Hant", "stroke", "big5han", "gb2312han", "pinyin", "standard", "unihan", "search"},
{"zh_TW", "stroke", "big5han", "gb2312han", "pinyin", "standard", "unihan", "search"},
{"zh__PINYIN", "pinyin", "big5han", "gb2312han", "standard", "stroke", "unihan", "search"},
{"es_ES", "standard", "traditional", "search"},
{"es__TRADITIONAL", "traditional", "standard", "search"},
{"und@collation=phonebook", "standard", "search"},
{"de_DE@collation=big5han", "standard", "phonebook", "search"},
{"zzz@collation=xxx", "standard", "search"},
{"und", "standard", "ducet", "search"},
{"en_US", "standard", "ducet", "search"},
{"en_029", "standard", "ducet", "search"},
{"de_DE", "standard", "phonebook", "search", "ducet"},
{"de_Latn_DE", "standard", "phonebook", "search", "ducet"},
{"zh", "pinyin", "big5han", "gb2312han", "standard", "stroke", "unihan", "ducet", "search"},
{"zh_Hans", "pinyin", "big5han", "gb2312han", "standard", "stroke", "unihan", "ducet", "search"},
{"zh_CN", "pinyin", "big5han", "gb2312han", "standard", "stroke", "unihan", "ducet", "search"},
{"zh_Hant", "stroke", "big5han", "gb2312han", "pinyin", "standard", "unihan", "ducet", "search"},
{"zh_TW", "stroke", "big5han", "gb2312han", "pinyin", "standard", "unihan", "ducet", "search"},
{"zh__PINYIN", "pinyin", "big5han", "gb2312han", "standard", "stroke", "unihan", "ducet", "search"},
{"es_ES", "standard", "search", "traditional", "ducet"},
{"es__TRADITIONAL", "traditional", "search", "standard", "ducet"},
{"und@collation=phonebook", "standard", "ducet", "search"},
{"de_DE@collation=big5han", "standard", "phonebook", "search", "ducet"},
{"zzz@collation=xxx", "standard", "ducet", "search"},
};
for (int i = 0; i < PREFERRED.length; i++) {

View file

@ -39,7 +39,7 @@ public class G7CollationTest extends TestFmwk{
{ 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* en_US */
{ 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* en_GB */
{ 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* en_CA */
{ 12, 13, 9, 0, 14, 1, 11, 3, 2, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* fr_FR */
{ 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* fr_FR */
{ 12, 13, 9, 0, 14, 1, 11, 3, 2, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* fr_CA */
{ 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* de_DE */
{ 12, 13, 9, 0, 14, 1, 11, 2, 3, 4, 5, 6, 8, 10, 7, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, /* it_IT */
@ -292,4 +292,4 @@ public class G7CollationTest extends TestFmwk{
target += "]";
return target;
}
}
}

View file

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 1996-2009, International Business Machines Corporation and *
* Copyright (C) 1996-2010, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -625,23 +625,23 @@ public class RbnfTest extends TestFmwk {
String[][] testDataDefault = {
{ "101", "ett\u00ADhundra\u00ADett" },
{ "123", "ett\u00ADhundra\u00ADtjugo\u00ADtre" },
{ "1,001", "ettusen ett" },
{ "1,100", "ettusen ett\u00ADhundra" },
{ "1,101", "ettusen ett\u00ADhundra\u00ADett" },
{ "1,234", "ettusen tv\u00e5\u00ADhundra\u00ADtrettio\u00ADfyra" },
{ "1,001", "et\u00ADtusen ett" },
{ "1,100", "et\u00ADtusen ett\u00ADhundra" },
{ "1,101", "et\u00ADtusen ett\u00ADhundra\u00ADett" },
{ "1,234", "et\u00ADtusen tv\u00e5\u00ADhundra\u00ADtrettio\u00ADfyra" },
{ "10,001", "tio\u00ADtusen ett" },
{ "11,000", "elva\u00ADtusen" },
{ "12,000", "tolv\u00ADtusen" },
{ "20,000", "tjugo-tusen" },
{ "21,000", "tjugo\u00ADett-tusen" },
{ "21,001", "tjugo\u00ADett-tusen ett" },
{ "200,000", "tv\u00e5\u00ADhundra-tusen" },
{ "201,000", "tv\u00e5\u00ADhundra\u00ADett-tusen" },
{ "200,200", "tv\u00e5\u00ADhundra-tusen tv\u00e5\u00ADhundra" },
{ "20,000", "tjugo\u00ADtusen" },
{ "21,000", "tjugo\u00ADet\u00ADtusen" },
{ "21,001", "tjugo\u00ADet\u00ADtusen ett" },
{ "200,000", "tv\u00e5\u00ADhundra\u00ADtusen" },
{ "201,000", "tv\u00e5\u00ADhundra\u00ADet\u00ADtusen" },
{ "200,200", "tv\u00e5\u00ADhundra\u00ADtusen tv\u00e5\u00ADhundra" },
{ "2,002,000", "tv\u00e5 miljoner tv\u00e5\u00ADtusen" },
{ "12,345,678", "tolv miljoner tre\u00ADhundra\u00ADfyrtio\u00ADfem-tusen sex\u00ADhundra\u00ADsjuttio\u00AD\u00e5tta" },
{ "123,456.789", "ett\u00ADhundra\u00ADtjugo\u00ADtre-tusen fyra\u00ADhundra\u00ADfemtio\u00ADsex komma sju \u00e5tta nio" },
{ "-12,345.678", "minus tolv\u00ADtusen tre\u00ADhundra\u00ADfyrtio\u00ADfem komma sex sju \u00e5tta" }
{ "12,345,678", "tolv miljoner tre\u00ADhundra\u00ADfyrtio\u00ADfem\u00ADtusen sex\u00ADhundra\u00ADsjuttio\u00AD\u00e5tta" },
{ "123,456.789", "ett\u00ADhundra\u00ADtjugo\u00ADtre\u00ADtusen fyra\u00ADhundra\u00ADfemtio\u00ADsex komma sju \u00e5tta nio" },
{ "-12,345.678", "minus tolv\u00ADtusen tre\u00ADhundra\u00ADfyrtio\u00ADfem komma sex sju \u00e5tta" },
};
logln("testing default rules");
@ -662,7 +662,7 @@ public class RbnfTest extends TestFmwk {
String[][] testDataYear = {
{ "101", "ett\u00adhundra\u00adett" },
{ "900", "nio\u00adhundra" },
{ "1,001", "ettusen ett" },
{ "1,001", "et\u00adtusen ett" },
{ "1,100", "elva\u00adhundra" },
{ "1,101", "elva\u00adhundra\u00adett" },
{ "1,234", "tolv\u00adhundra\u00adtrettio\u00adfyra" },

View file

@ -680,13 +680,13 @@ public final class ICUResourceBundleTest extends TestFmwk {
public void TestLocaleDisplayNames() {
ULocale[] locales = ULocale.getAvailableLocales();
for (int i = 0; i < locales.length; ++i) {
if (!hasLocalizedCountryFor(ULocale.ENGLISH, locales[i])){
if (!hasLocalizedCountryFor(ULocale.ENGLISH, locales[i]) && (locales[i].getLanguage().compareTo("ti") != 0)){ // TODO: restore test for ti_* when cldrbug 3058 is fixed
errln("Could not get localized country for "+ locales[i]);
}
if(!hasLocalizedLanguageFor(ULocale.ENGLISH, locales[i])){
errln("Could not get localized language for "+ locales[i]);
}
if(!hasLocalizedCountryFor(locales[i], locales[i])){
if(!hasLocalizedCountryFor(locales[i], locales[i]) && (locales[i].getLanguage().compareTo("ti") != 0)){ // TODO: restore test for ti_* when cldrbug 3058 is fixed
errln("Could not get localized country for "+ locales[i]);
hasLocalizedCountryFor(locales[i], locales[i]);
}