diff options
author | Neil Fuller <nfuller@google.com> | 2015-02-04 11:55:54 +0000 |
---|---|---|
committer | Neil Fuller <nfuller@google.com> | 2015-02-04 16:42:32 +0000 |
commit | 656a2e45ac4d986baf7b3cd3bffa83b5f83bf98c (patch) | |
tree | 3fd921a42cfeb1fc5f78216618cbbc1fbfaaaa30 /luni | |
parent | ebfb8f8b0ee0c0a75d92d8fc56ccd0d87ee7e9ad (diff) | |
download | libcore-656a2e45ac4d986baf7b3cd3bffa83b5f83bf98c.zip libcore-656a2e45ac4d986baf7b3cd3bffa83b5f83bf98c.tar.gz libcore-656a2e45ac4d986baf7b3cd3bffa83b5f83bf98c.tar.bz2 |
Work around issues for MR1 release associated with timezone issue.
Modify the tests that were using Pacific/Apia and replace with
America/Santiago instead. Pacific/Apia is missing translations
in the version of CLDR shipped with MR1. America/Santiago fits
the criterion of "has no short names".
Bug: 19212588
Change-Id: If241736446fdbbc98464952edad9cbfefc289cb6
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/test/java/libcore/java/text/DateFormatSymbolsTest.java | 14 | ||||
-rw-r--r-- | luni/src/test/java/libcore/java/util/TimeZoneTest.java | 12 |
2 files changed, 13 insertions, 13 deletions
diff --git a/luni/src/test/java/libcore/java/text/DateFormatSymbolsTest.java b/luni/src/test/java/libcore/java/text/DateFormatSymbolsTest.java index 057cd17..e6933e6 100644 --- a/luni/src/test/java/libcore/java/text/DateFormatSymbolsTest.java +++ b/luni/src/test/java/libcore/java/text/DateFormatSymbolsTest.java @@ -147,17 +147,17 @@ public class DateFormatSymbolsTest extends junit.framework.TestCase { } // http://b/7955614 - public void test_getZoneStrings_Apia() throws Exception { + public void test_getZoneStrings_GMT_short_names() throws Exception { String[][] array = DateFormatSymbols.getInstance(Locale.US).getZoneStrings(); for (int i = 0; i < array.length; ++i) { String[] row = array[i]; - // Pacific/Apia is somewhat arbitrary; we just want a zone we have to generate + // America/Santiago is somewhat arbitrary; we just want a zone we have to generate // "GMT" strings for the short names. - if (row[0].equals("Pacific/Apia")) { - assertEquals("Samoa Standard Time", row[1]); - assertEquals("GMT+13:00", row[2]); - assertEquals("Samoa Daylight Time", row[3]); - assertEquals("GMT+14:00", row[4]); + if (row[0].equals("America/Santiago")) { + assertEquals("Chile Standard Time", row[1]); + assertEquals("GMT-03:00", row[2]); + assertEquals("Chile Summer Time", row[3]); + assertEquals("GMT-03:00", row[4]); } } } diff --git a/luni/src/test/java/libcore/java/util/TimeZoneTest.java b/luni/src/test/java/libcore/java/util/TimeZoneTest.java index caf635c..1ca950c 100644 --- a/luni/src/test/java/libcore/java/util/TimeZoneTest.java +++ b/luni/src/test/java/libcore/java/util/TimeZoneTest.java @@ -256,12 +256,12 @@ public class TimeZoneTest extends TestCase { } // http://b/7955614 - public void testApia() throws Exception { - TimeZone tz = TimeZone.getTimeZone("Pacific/Apia"); - assertEquals("Samoa Daylight Time", tz.getDisplayName(true, TimeZone.LONG, Locale.US)); - assertEquals("Samoa Standard Time", tz.getDisplayName(false, TimeZone.LONG, Locale.US)); - assertEquals("GMT+14:00", tz.getDisplayName(true, TimeZone.SHORT, Locale.US)); - assertEquals("GMT+13:00", tz.getDisplayName(false, TimeZone.SHORT, Locale.US)); + public void test_getDisplayName_GMT_short_names() throws Exception { + TimeZone tz = TimeZone.getTimeZone("America/Santiago"); + assertEquals("Chile Summer Time", tz.getDisplayName(true, TimeZone.LONG, Locale.US)); + assertEquals("Chile Standard Time", tz.getDisplayName(false, TimeZone.LONG, Locale.US)); + assertEquals("GMT-03:00", tz.getDisplayName(true, TimeZone.SHORT, Locale.US)); + assertEquals("GMT-03:00", tz.getDisplayName(false, TimeZone.SHORT, Locale.US)); } private static boolean isGmtString(String s) { |