summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Fuller2015-02-04 11:55:54 +0000
committerNeil Fuller2015-02-04 16:42:32 +0000
commitb51014e307e3814da0eae66014de8a4ac8bd6767 (patch)
tree3fd921a42cfeb1fc5f78216618cbbc1fbfaaaa30
parente3f61187f0357a6569cb00bfa89bbf8e362f3439 (diff)
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
-rw-r--r--luni/src/test/java/libcore/java/text/DateFormatSymbolsTest.java14
-rw-r--r--luni/src/test/java/libcore/java/util/TimeZoneTest.java12
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) {