You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by py...@apache.org on 2006/07/31 05:27:20 UTC
svn commit: r427009 -
/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/GregorianCalendarTest.java
Author: pyang
Date: Sun Jul 30 20:27:20 2006
New Revision: 427009
URL: http://svn.apache.org/viewvc?rev=427009&view=rev
Log:
Regression tests for HARMONY-998 (java.util.Calendar: large hours, minutes and seconds are handled incorrectly)
Modified:
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/GregorianCalendarTest.java
Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/GregorianCalendarTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/GregorianCalendarTest.java?rev=427009&r1=427008&r2=427009&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/GregorianCalendarTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/GregorianCalendarTest.java Sun Jul 30 20:27:20 2006
@@ -1,4 +1,4 @@
-/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+/* Copyright 1998, 2006 The Apache Software Foundation or its licensors, as applicable
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -71,6 +71,11 @@
9, gc.get(Calendar.MINUTE));
assertTrue("Incorrect calendar constructed", gc.getTimeZone().equals(
TimeZone.getDefault()));
+
+ //Regression for HARMONY-998
+ gc = new GregorianCalendar(1900, 0, 0, 0, Integer.MAX_VALUE);
+ assertEquals("Incorrect calendar constructed",
+ 5983, gc.get(Calendar.YEAR));
}
/**
@@ -558,15 +563,6 @@
assertEquals("Before", dayOfMonth, gCalend.get(Calendar.DAY_OF_MONTH));
gCalend.set(Calendar.MILLISECOND, 0);//changes nothing
assertEquals("After", dayOfMonth, gCalend.get(Calendar.DAY_OF_MONTH));
- }
-
- /**
- * @tests GregorianCalendar#GregorianCalendar()
- */
- public void testConstructorMaxvalue(){
- Calendar cal = new GregorianCalendar();
- cal.set(1900, 0, 0, 0, Integer.MAX_VALUE);
- assertTrue(cal.getTime().getTime()>0);
}
/**