summaryrefslogtreecommitdiff
path: root/libjava/testsuite
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2002-10-03 13:12:01 +0000
committerAndrew Haley <aph@gcc.gnu.org>2002-10-03 13:12:01 +0000
commitcd8dbeeff36324337118fcce3d0450f84996357d (patch)
tree3743d8b4fe1d8b3fa5f8ba23ad11453f071c0626 /libjava/testsuite
parente832ab3c91f01cdb1bd618ffe4a8e00505264d22 (diff)
downloadgcc-cd8dbeeff36324337118fcce3d0450f84996357d.tar.gz
Array_3.java (baz): New.
2002-10-03 Andrew Haley <aph@redhat.com> * libjava.lang/Array_3.java (baz): New. (main): Call baz. From-SVN: r57774
Diffstat (limited to 'libjava/testsuite')
-rw-r--r--libjava/testsuite/ChangeLog5
-rw-r--r--libjava/testsuite/libjava.lang/Array_3.java19
2 files changed, 24 insertions, 0 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog
index adb0e1e246b..6ca342d32a2 100644
--- a/libjava/testsuite/ChangeLog
+++ b/libjava/testsuite/ChangeLog
@@ -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.
diff --git a/libjava/testsuite/libjava.lang/Array_3.java b/libjava/testsuite/libjava.lang/Array_3.java
index 453387d51fb..e94549a0f4e 100644
--- a/libjava/testsuite/libjava.lang/Array_3.java
+++ b/libjava/testsuite/libjava.lang/Array_3.java
@@ -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");
}
}