harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r395134 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/DateTest.java
Date Wed, 19 Apr 2006 05:20:05 GMT
Author: smishura
Date: Tue Apr 18 22:20:02 2006
New Revision: 395134

URL: http://svn.apache.org/viewcvs?rev=395134&view=rev
Log:
Adding regression test for HARMONY-238 (java.util.Date(null) should throw IllegalArgumentException
not NullPointerException)

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

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/DateTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/DateTest.java?rev=395134&r1=395133&r2=395134&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/DateTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/DateTest.java
Tue Apr 18 22:20:02 2006
@@ -100,6 +100,15 @@
 		Date d1 = new Date("January 1, 1970, 00:00:00 GMT"); // the epoch
 		Date d2 = new Date(0); // the epoch
 		assertTrue("Created incorrect date", d1.equals(d2));
+        
+		try {
+			// Regression for HARMONY-238
+			new Date(null);
+			fail("Constructor Date((String)null) should "
+				+ "throw IllegalArgumentException");
+		} catch (IllegalArgumentException e) {
+			// expected
+		}
 	}
 
 	/**



Mime
View raw message