harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r406559 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/AbstractCollectionTest.java
Date Mon, 15 May 2006 06:53:05 GMT
Author: smishura
Date: Sun May 14 23:53:04 2006
New Revision: 406559

URL: http://svn.apache.org/viewcvs?rev=406559&view=rev
Log:
Adding exceptions testing

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

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/AbstractCollectionTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/AbstractCollectionTest.java?rev=406559&r1=406558&r2=406559&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/AbstractCollectionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/AbstractCollectionTest.java
Sun May 14 23:53:04 2006
@@ -115,6 +115,21 @@
      * @tests java.util.AbstractCollection#toArray(java.lang.Object[])
      */
     public void test_toArray$Ljava_lang_Object() {
+
+        try {
+            org.toArray(null);
+            fail("No expected NullPointerException");
+        } catch (NullPointerException e) {
+            // expected
+        }
+
+        try {
+            org.toArray(new String[org.size()]);
+            fail("No expected ArrayStoreException");
+        } catch (ArrayStoreException e) {
+            // expected
+        }
+
         Object[] objArray = new Object[100];
         org.toArray(objArray);
         assertEquals("a) Length", 100, objArray.length);



Mime
View raw message