harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r559334 - /harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/util/GregorianCalendarTest.java
Date Wed, 25 Jul 2007 06:39:26 GMT
Author: tonywu
Date: Tue Jul 24 23:39:25 2007
New Revision: 559334

URL: http://svn.apache.org/viewvc?view=rev&rev=559334
Log:
make regression test for HARMONY-4513 be timezone independent

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/util/GregorianCalendarTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/util/GregorianCalendarTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/util/GregorianCalendarTest.java?view=diff&rev=559334&r1=559333&r2=559334
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/util/GregorianCalendarTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/util/GregorianCalendarTest.java
Tue Jul 24 23:39:25 2007
@@ -726,14 +726,15 @@
         assertEquals(11, gc.get(Calendar.MONTH));
         
         // Regression test for HARMONY-4513
-        gc = new GregorianCalendar(1582, Calendar.OCTOBER, 15);
+        gc = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
+        gc.set(1582, Calendar.OCTOBER, 15, 0, 0, 0);
         assertEquals(1582, gc.get(Calendar.YEAR));
         assertEquals(Calendar.OCTOBER, gc.get(Calendar.MONTH));
         assertEquals(15, gc.get(Calendar.DAY_OF_MONTH));
         assertEquals(0, gc.get(Calendar.HOUR_OF_DAY));
         assertEquals(0, gc.get(Calendar.MINUTE));
         assertEquals(0, gc.get(Calendar.SECOND));
-        gc = new GregorianCalendar(1582, Calendar.OCTOBER, 14);
+        gc.set(1582, Calendar.OCTOBER, 14, 0, 0, 0);
         assertEquals(24, gc.get(Calendar.DAY_OF_MONTH));
     }
 



Mime
View raw message