ICU-3938 valid sub locales - fix tests
X-SVN-Rev: 16787
This commit is contained in:
parent
61eede6243
commit
f36cbfc414
@ -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 */
|
||||
|
@ -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",
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user