summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Roubert <roubert@google.com>2015-03-02 22:12:10 +0100
committerFredrik Roubert <roubert@google.com>2017-11-30 17:03:51 +0100
commite0288195c23df26c3c6e0ac2bbf4b6af31b16f08 (patch)
treec510c54042cd88f72dcfae00d4002221841e306a
parentca618e2b137547c98a702d061b0e7fff52e7c12c (diff)
downloadicu-e0288195c23df26c3c6e0ac2bbf4b6af31b16f08.tar.gz
Android patch: Add exceptions for big5han and gb2312han in genrb.
This change was introduced in Android by the ICU 53 upgrade: https://android.googlesource.com/platform/external/icu/+/fceb398 Suppression of ICU4J test errors was added for ICU 55: https://android.googlesource.com/platform/external/icu/+/7b913b1 (cherry picked from commit d9fc98087b091be81a9a50fbff9c0e22855d8dac) Change-Id: I855782aba28520c9e91fea547a2cfa973b81f393
-rw-r--r--icu4c/source/tools/genrb/parse.cpp6
-rw-r--r--icu4j/main/tests/collate/src/com/ibm/icu/dev/test/util/ICUResourceBundleCollationTest.java24
2 files changed, 18 insertions, 12 deletions
diff --git a/icu4c/source/tools/genrb/parse.cpp b/icu4c/source/tools/genrb/parse.cpp
index 96ac4a731..4f4a64756 100644
--- a/icu4c/source/tools/genrb/parse.cpp
+++ b/icu4c/source/tools/genrb/parse.cpp
@@ -1030,7 +1030,11 @@ addCollation(ParseState* state, TableResource *result, const char *collationTyp
}
static UBool
-keepCollationType(const char * /*type*/) {
+keepCollationType(const char *type) { // android-changed
+ // BEGIN android-added
+ if (uprv_strcmp(type, "big5han") == 0) { return FALSE; }
+ if (uprv_strcmp(type, "gb2312han") == 0) { return FALSE; }
+ // END android-added
return TRUE;
}
diff --git a/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/util/ICUResourceBundleCollationTest.java b/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/util/ICUResourceBundleCollationTest.java
index 009613adf..93808e784 100644
--- a/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/util/ICUResourceBundleCollationTest.java
+++ b/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/util/ICUResourceBundleCollationTest.java
@@ -30,6 +30,7 @@ public final class ICUResourceBundleCollationTest extends TestFmwk {
@Test
public void TestFunctionalEquivalent(){
+ // Android patch: Add exceptions for big5han and gb2312han in genrb.
String[] collCases = {
// avail locale equiv
"f", "sv_US_CALIFORNIA", "sv",
@@ -48,19 +49,19 @@ public final class ICUResourceBundleCollationTest extends TestFmwk {
"f", "zh_MO", "zh@collation=stroke", /* alias of zh_Hant_MO */
"f", "zh_Hant_MO", "zh@collation=stroke",
"f", "zh_TW_STROKE", "zh@collation=stroke",
- "f", "zh_TW_STROKE@collation=big5han", "zh@collation=big5han",
+ // "f", "zh_TW_STROKE@collation=big5han", "zh@collation=big5han",
"f", "sv_CN@calendar=japanese", "sv",
"t", "sv@calendar=japanese", "sv",
- "f", "zh_TW@collation=big5han", "zh@collation=big5han", /* alias of zh_Hant_TW */
- "f", "zh_Hant_TW@collation=big5han", "zh@collation=big5han",
- "f", "zh_TW@collation=gb2312han", "zh@collation=gb2312han", /* alias of zh_Hant_TW */
- "f", "zh_Hant_TW@collation=gb2312han", "zh@collation=gb2312han",
- "f", "zh_CN@collation=big5han", "zh@collation=big5han", /* alias of zh_Hans_CN */
- "f", "zh_Hans_CN@collation=big5han", "zh@collation=big5han",
- "f", "zh_CN@collation=gb2312han", "zh@collation=gb2312han", /* alias of zh_Hans_CN */
- "f", "zh_Hans_CN@collation=gb2312han", "zh@collation=gb2312han",
- "t", "zh@collation=big5han", "zh@collation=big5han",
- "t", "zh@collation=gb2312han", "zh@collation=gb2312han",
+ // "f", "zh_TW@collation=big5han", "zh@collation=big5han", /* alias of zh_Hant_TW */
+ // "f", "zh_Hant_TW@collation=big5han", "zh@collation=big5han",
+ // "f", "zh_TW@collation=gb2312han", "zh@collation=gb2312han", /* alias of zh_Hant_TW */
+ // "f", "zh_Hant_TW@collation=gb2312han", "zh@collation=gb2312han",
+ // "f", "zh_CN@collation=big5han", "zh@collation=big5han", /* alias of zh_Hans_CN */
+ // "f", "zh_Hans_CN@collation=big5han", "zh@collation=big5han",
+ // "f", "zh_CN@collation=gb2312han", "zh@collation=gb2312han", /* alias of zh_Hans_CN */
+ // "f", "zh_Hans_CN@collation=gb2312han", "zh@collation=gb2312han",
+ // "t", "zh@collation=big5han", "zh@collation=big5han",
+ // "t", "zh@collation=gb2312han", "zh@collation=gb2312han",
"t", "hi@collation=standard", "hi",
"f", "hi_AU@collation=standard;currency=CHF;calendar=buddhist", "hi",
"f", "sv_SE@collation=pinyin", "sv", /* bug 4582 tests */
@@ -72,6 +73,7 @@ public final class ICUResourceBundleCollationTest extends TestFmwk {
"f", "nl_NL@collation=stroke", "root",
"f", "nl_NL_EEXT@collation=stroke", "root",
};
+ // Android patch end.
logln("Testing functional equivalents for collation...");
getFunctionalEquivalentTestCases(ICUData.ICU_COLLATION_BASE_NAME,