Array_3.java (baz): New.
authorAndrew Haley <aph@redhat.com>
Thu, 3 Oct 2002 13:12:01 +0000 (13:12 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Thu, 3 Oct 2002 13:12:01 +0000 (13:12 +0000)
2002-10-03  Andrew Haley  <aph@redhat.com>

* libjava.lang/Array_3.java (baz): New.
(main): Call baz.

From-SVN: r57774

libjava/testsuite/ChangeLog
libjava/testsuite/libjava.lang/Array_3.java

index adb0e1e..6ca342d 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-03  Andrew Haley  <aph@redhat.com>
+
+       * libjava.lang/Array_3.java (baz): New.
+       (main): Call baz.
+
 2002-09-29  Anthony Green  <green@redhat.com>
 
        * libjava.lang/TestProxy.java: New file.
index 453387d..e94549a 100644 (file)
@@ -12,6 +12,13 @@ public class Array_3
     return null;
   }
 
+  static int baz ()
+  {
+    int[] x = (int[])null;
+    int nn = x.length;
+    return 5;
+  }
+
   public static void main(String args[])
   {
     boolean ok = false;
@@ -68,5 +75,17 @@ public class Array_3
       }
     if (!ok)
       throw new RuntimeException("test failed:4");
+
+    ok = false;
+    try
+      {
+       nn = baz ();
+      }
+    catch (NullPointerException _)
+      {
+       ok = true;
+      }
+    if (!ok)
+      throw new RuntimeException("test failed:5");
   }
 }