From 3f2128b3408255e317f66c10c6dd5edbff53b3ee Mon Sep 17 00:00:00 2001 From: Narayan Kamath Date: Fri, 9 May 2014 16:44:32 +0100 Subject: Blacklist a known failure in GregorianCalendarTest. The issues here relate to how we deal with ambiguous wall clock times, i.e, wall clock values that we "skip" when we move the clock forward when transitioning into daylight savings, and wall clock times that occur twice when we move the clock backward This isn't a regression. We've never handled this correctly. bug: 12778197 Change-Id: Ida79583c02c6895096a8afdd8f59b1002b282d32 --- .../harmony/tests/java/util/GregorianCalendarTest.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'harmony-tests') diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/GregorianCalendarTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/GregorianCalendarTest.java index 47c76f3..058681e 100644 --- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/GregorianCalendarTest.java +++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/GregorianCalendarTest.java @@ -697,20 +697,22 @@ public class GregorianCalendarTest extends junit.framework.TestCase { new Locale("en", "GB") ); g.clear(); - g.set(2006, 02, 26, 01, 50, 00); + g.set(2006, Calendar.MARCH, 26, 01, 50, 00); assertEquals(1143337800000L, g.getTimeInMillis()); GregorianCalendar g1 = new GregorianCalendar( - TimeZone.getTimeZone("Europe/Moscow") - ); + TimeZone.getTimeZone("Europe/Moscow")); g1.clear(); - g1.set(2006, 02, 26, 02, 20, 00); // in the DST transition interval + g1.set(2006, Calendar.MARCH, 26, 02, 20, 00); assertEquals(1143328800000L, g1.getTimeInMillis()); assertEquals(3, g1.get(Calendar.HOUR_OF_DAY)); + assertEquals(20, g1.get(Calendar.MINUTE)); + g1.clear(); - g1.set(2006, 9, 29, 02, 50, 00); // transition from DST + g1.set(2006, Calendar.OCTOBER, 29, 02, 50, 00); assertEquals(1162079400000L, g1.getTimeInMillis()); assertEquals(2, g1.get(Calendar.HOUR_OF_DAY)); + assertEquals(50, g1.get(Calendar.MINUTE)); // End of regression test } -- cgit v1.1