ICU-3938 valid sub locales - fix tests

X-SVN-Rev: 16787
This commit is contained in:
Vladimir Weinstein 2004-11-05 22:50:08 +00:00
parent 61eede6243
commit f36cbfc414
3 changed files with 10 additions and 10 deletions

View File

@ -1125,10 +1125,10 @@ void TestGetLocale() {
const char* validLocale;
const char* actualLocale;
} testStruct[] = {
{ "sr_YU", "sr", "ru" },
{ "sh_YU", "sh", "hr" }, /* this used to be sh, but now sh collation aliases hr */
{ "sr_YU", "sr_YU", "ru" },
{ "sh_YU", "sh_YU", "hr" }, /* this used to be sh, but now sh collation aliases hr */
{ "en_BE_FOO", "en_BE", "en_BE" },
{ "fr_FR_NONEXISTANT", "fr", "fr" }
{ "fr_FR_NONEXISTANT", "fr_FR", "fr" }
};
/* test opening collators for different locales */

View File

@ -2435,7 +2435,7 @@ static void TestGetFunctionalEquivalent(void) {
"t", "zh_TW@collation=stroke", "zh@collation=stroke",
"f", "de_CN@collation=pinyin", "de",
"t", "zh@collation=pinyin", "zh",
"f", "zh_CN@collation=pinyin", "zh", /* should be 'T' when validSubLocales works */
"t", "zh_CN@collation=pinyin", "zh", /* should be 'T' when validSubLocales works */
"t", "zh_HK@collation=pinyin", "zh",
"t", "zh_HK@collation=stroke", "zh@collation=stroke",
"t", "zh_HK", "zh@collation=stroke",
@ -2446,11 +2446,11 @@ static void TestGetFunctionalEquivalent(void) {
"t", "de@calendar=japanese", "de",
"t", "zh_TW@collation=big5han", "zh@collation=big5han",
"t", "zh_TW@collation=gb2312han", "zh@collation=gb2312han",
"f", "zh_CN@collation=big5han", "zh@collation=big5han",
"f", "zh_CN@collation=gb2312han", "zh@collation=gb2312han",
"t", "zh_CN@collation=big5han", "zh@collation=big5han",
"t", "zh_CN@collation=gb2312han", "zh@collation=gb2312han",
"t", "zh@collation=big5han", "zh@collation=big5han",
"t", "zh@collation=gb2312han", "zh@collation=gb2312han",
"f", "hi_IN@collation=direct", "hi@collation=direct",
"t", "hi_IN@collation=direct", "hi@collation=direct",
"t", "hi@collation=standard", "hi",
"t", "hi@collation=direct", "hi@collation=direct",
"f", "hi_AU@collation=direct;currency=CHF;calendar=buddhist", "hi@collation=direct",

View File

@ -62,7 +62,7 @@ void CollationServiceTest::TestRegister()
errln(UnicodeString("fr collator's requested locale changed to ") + loc.getName());
}
loc = frcol->getLocale(ULOC_VALID_LOCALE, status);
if (loc != FRENCH) {
if (loc != FR) {
errln(UnicodeString("fr collator's valid locale changed to ") + loc.getName());
}
@ -567,8 +567,8 @@ void CollationServiceTest::TestSeparateTree() {
isAvailable, ec);
assertSuccess("getFunctionalEquivalent", ec);
assertEquals("getFunctionalEquivalent(fr_FR)", "fr", equiv.getName());
assertTrue("getFunctionalEquivalent(fr_FR).isAvailable==FALSE",
isAvailable == FALSE);
assertTrue("getFunctionalEquivalent(fr_FR).isAvailable==TRUE",
isAvailable == TRUE);
}
#endif