summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlmaz Mingaleev <mingaleev@google.com>2021-01-18 11:36:13 +0000
committerwonil <wonil@google.com>2021-02-02 03:14:03 +0000
commit6ed6f556bae65c033f8365ee75bccc3e4ecd49c6 (patch)
tree7a75900ca3348288163880ca0bcdf1c1ffdaacc7
parent8128319fcdb2ab92f0532e3d74d80f38837f0de5 (diff)
downloadicu-6ed6f556bae65c033f8365ee75bccc3e4ecd49c6.tar.gz
DO NOT MERGE Cherry-pick ICU-21448: Update Android ICU tzdata from 2020d to 2020f. [O-MR1 CTS]
Cherry-pick ICU-21448: Update Android ICU tzdata from 2020d to 2020f. [O-MR1 CTS] This is a cherry pick of https://github.com/unicode-org/icu/commit/25eb1510ec4e536fe0d0d1024b3ce71819510d0a. New test cases in SimpleDateFormat.java and tzfmttst.cpp were skipped as they rely on prod code changes. See https://github.com/unicode-org/icu/pull/1526/files#r552372640 for more details. For CTS, code and data changes were skipped from original CL as goal is to fix failing TimeZoneTest on devices with 2020f update. See b/177644925 for partner reported waiver req. Bug: 177962816 Test: CtsIcuTestCases Merged-In: Ic537360ec304c72468f558d7a5093a54a60d654f Change-Id: Ic537360ec304c72468f558d7a5093a54a60d654f (cherry picked from commit 5f4df32641bdf69b1a66cca7ee1c1a895e63fd6f)
-rw-r--r--android_icu4j/src/main/tests/android/icu/dev/test/format/TimeZoneFormatTest.java10
-rw-r--r--android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneTest.java2
-rw-r--r--icu4c/source/test/intltest/tztest.cpp2
-rw-r--r--icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/TimeZoneFormatTest.java10
-rw-r--r--icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneTest.java2
5 files changed, 16 insertions, 10 deletions
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/TimeZoneFormatTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/TimeZoneFormatTest.java
index 039e239e9..d5e3ebe75 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/TimeZoneFormatTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/TimeZoneFormatTest.java
@@ -385,7 +385,7 @@ public class TimeZoneFormatTest extends android.icu.dev.test.TestFmwk {
Set<String> ids = null;
if (JDKTZ) {
- ids = new TreeSet<String>();
+ ids = new TreeSet<>();
String[] jdkIDs = java.util.TimeZone.getAvailableIDs();
for (String jdkID : jdkIDs) {
if (EXCL_TZ_PATTERN.matcher(jdkID).matches()) {
@@ -659,7 +659,7 @@ public class TimeZoneFormatTest extends android.icu.dev.test.TestFmwk {
TimeType expType = (TimeType)test[7];
TimeZoneFormat tzfmt = TimeZoneFormat.getInstance(loc);
- Output<TimeType> timeType = new Output<TimeType>(TimeType.UNKNOWN);
+ Output<TimeType> timeType = new Output<>(TimeType.UNKNOWN);
ParsePosition pos = new ParsePosition(inPos);
TimeZone tz = tzfmt.parse(style, text, pos, options, timeType);
@@ -949,7 +949,7 @@ public class TimeZoneFormatTest extends android.icu.dev.test.TestFmwk {
for (Object[] testCase : TESTDATA) {
TimeZone tz = TimeZone.getTimeZone((String)testCase[1]);
- Output<TimeType> timeType = new Output<TimeType>();
+ Output<TimeType> timeType = new Output<>();
ULocale uloc = new ULocale((String)testCase[0]);
TimeZoneFormat tzfmt = TimeZoneFormat.getInstance(uloc);
@@ -1045,7 +1045,7 @@ public class TimeZoneFormatTest extends android.icu.dev.test.TestFmwk {
tzfmt.setTimeZoneNames(tzdbNames);
TimeZone tz = TimeZone.getTimeZone((String)testCase[1]);
- Output<TimeType> timeType = new Output<TimeType>();
+ Output<TimeType> timeType = new Output<>();
String out = tzfmt.format((Style)testCase[3], tz, ((Date)testCase[2]).getTime(), timeType);
if (!out.equals(testCase[4]) || timeType.value != testCase[5]) {
@@ -1100,7 +1100,7 @@ public class TimeZoneFormatTest extends android.icu.dev.test.TestFmwk {
public void TestTZDBNamesThreading() {
final TZDBTimeZoneNames names = new TZDBTimeZoneNames(ULocale.ENGLISH);
final AtomicInteger found = new AtomicInteger();
- List<Thread> threads = new ArrayList<Thread>();
+ List<Thread> threads = new ArrayList<>();
final int numIteration = 1000;
try {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneTest.java
index 7c7f6b466..fe6b263f1 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneTest.java
@@ -1577,6 +1577,8 @@ public class TimeZoneTest extends TestFmwk
{"Asia/Vientiane", "Asia/Bangkok"},
{"Atlantic/Jan_Mayen", "Europe/Oslo"},
{"Atlantic/St_Helena", "Africa/Abidjan"},
+ {"Australia/Currie", "Australia/Hobart"},
+ {"Australia/Tasmania", "Australia/Hobart"},
{"Europe/Bratislava", "Europe/Prague"},
{"Europe/Busingen", "Europe/Zurich"},
{"Europe/Guernsey", "Europe/London"},
diff --git a/icu4c/source/test/intltest/tztest.cpp b/icu4c/source/test/intltest/tztest.cpp
index 00a6707e5..0659245e1 100644
--- a/icu4c/source/test/intltest/tztest.cpp
+++ b/icu4c/source/test/intltest/tztest.cpp
@@ -2047,6 +2047,8 @@ void TimeZoneTest::TestCanonicalID() {
{"Asia/Vientiane", "Asia/Bangkok"},
{"Atlantic/Jan_Mayen", "Europe/Oslo"},
{"Atlantic/St_Helena", "Africa/Abidjan"},
+ {"Australia/Currie", "Australia/Hobart"},
+ {"Australia/Tasmania", "Australia/Hobart"},
{"Europe/Bratislava", "Europe/Prague"},
{"Europe/Busingen", "Europe/Zurich"},
{"Europe/Guernsey", "Europe/London"},
diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/TimeZoneFormatTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/TimeZoneFormatTest.java
index 1ac13ec95..0451aeb2a 100644
--- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/TimeZoneFormatTest.java
+++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/TimeZoneFormatTest.java
@@ -382,7 +382,7 @@ public class TimeZoneFormatTest extends com.ibm.icu.dev.test.TestFmwk {
Set<String> ids = null;
if (JDKTZ) {
- ids = new TreeSet<String>();
+ ids = new TreeSet<>();
String[] jdkIDs = java.util.TimeZone.getAvailableIDs();
for (String jdkID : jdkIDs) {
if (EXCL_TZ_PATTERN.matcher(jdkID).matches()) {
@@ -656,7 +656,7 @@ public class TimeZoneFormatTest extends com.ibm.icu.dev.test.TestFmwk {
TimeType expType = (TimeType)test[7];
TimeZoneFormat tzfmt = TimeZoneFormat.getInstance(loc);
- Output<TimeType> timeType = new Output<TimeType>(TimeType.UNKNOWN);
+ Output<TimeType> timeType = new Output<>(TimeType.UNKNOWN);
ParsePosition pos = new ParsePosition(inPos);
TimeZone tz = tzfmt.parse(style, text, pos, options, timeType);
@@ -946,7 +946,7 @@ public class TimeZoneFormatTest extends com.ibm.icu.dev.test.TestFmwk {
for (Object[] testCase : TESTDATA) {
TimeZone tz = TimeZone.getTimeZone((String)testCase[1]);
- Output<TimeType> timeType = new Output<TimeType>();
+ Output<TimeType> timeType = new Output<>();
ULocale uloc = new ULocale((String)testCase[0]);
TimeZoneFormat tzfmt = TimeZoneFormat.getInstance(uloc);
@@ -1042,7 +1042,7 @@ public class TimeZoneFormatTest extends com.ibm.icu.dev.test.TestFmwk {
tzfmt.setTimeZoneNames(tzdbNames);
TimeZone tz = TimeZone.getTimeZone((String)testCase[1]);
- Output<TimeType> timeType = new Output<TimeType>();
+ Output<TimeType> timeType = new Output<>();
String out = tzfmt.format((Style)testCase[3], tz, ((Date)testCase[2]).getTime(), timeType);
if (!out.equals(testCase[4]) || timeType.value != testCase[5]) {
@@ -1097,7 +1097,7 @@ public class TimeZoneFormatTest extends com.ibm.icu.dev.test.TestFmwk {
public void TestTZDBNamesThreading() {
final TZDBTimeZoneNames names = new TZDBTimeZoneNames(ULocale.ENGLISH);
final AtomicInteger found = new AtomicInteger();
- List<Thread> threads = new ArrayList<Thread>();
+ List<Thread> threads = new ArrayList<>();
final int numIteration = 1000;
try {
diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneTest.java
index 01d4b0324..a65cddfce 100644
--- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneTest.java
+++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/timezone/TimeZoneTest.java
@@ -1574,6 +1574,8 @@ public class TimeZoneTest extends TestFmwk
{"Asia/Vientiane", "Asia/Bangkok"},
{"Atlantic/Jan_Mayen", "Europe/Oslo"},
{"Atlantic/St_Helena", "Africa/Abidjan"},
+ {"Australia/Currie", "Australia/Hobart"},
+ {"Australia/Tasmania", "Australia/Hobart"},
{"Europe/Bratislava", "Europe/Prague"},
{"Europe/Busingen", "Europe/Zurich"},
{"Europe/Guernsey", "Europe/London"},