diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-02 23:36:47 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-02 23:36:47 +0000 |
commit | e7245f035e3b71626338f88f9730bc298a7e1390 (patch) | |
tree | 4c338a2cc2643112b0b46e94bfb3da0d33360cf5 /libjava/testsuite | |
parent | 1e7b68bbe03302cef59801e82508519739966e8e (diff) | |
download | gcc-e7245f035e3b71626338f88f9730bc298a7e1390.tar.gz |
* libjava.lang/initexc.java: New file.
* libjava.lang/initexc.out: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58761 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/testsuite')
-rw-r--r-- | libjava/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/initexc.java | 35 | ||||
-rw-r--r-- | libjava/testsuite/libjava.lang/initexc.out | 0 |
3 files changed, 40 insertions, 0 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog index 3d4e5860dd5..64f59c58a20 100644 --- a/libjava/testsuite/ChangeLog +++ b/libjava/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-11-02 Tom Tromey <tromey@redhat.com> + + * libjava.lang/initexc.java: New file. + * libjava.lang/initexc.out: New file. + 2002-11-01 Tom Tromey <tromey@redhat.com> For PR java/8415: diff --git a/libjava/testsuite/libjava.lang/initexc.java b/libjava/testsuite/libjava.lang/initexc.java new file mode 100644 index 00000000000..968009e45e1 --- /dev/null +++ b/libjava/testsuite/libjava.lang/initexc.java @@ -0,0 +1,35 @@ +public class initexc +{ + public static class fail + { + static + { + throw new NullPointerException("nope"); + } + + public static int val () + { + return 23; + } + } + + public static void main (String[] args) + { + try + { + System.out.println (fail.val ()); + } + catch (ExceptionInInitializerError _) + { + // Ok. + } + try + { + System.out.println (fail.val ()); + } + catch (NoClassDefFoundError _) + { + // Ok. + } + } +} diff --git a/libjava/testsuite/libjava.lang/initexc.out b/libjava/testsuite/libjava.lang/initexc.out new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/libjava/testsuite/libjava.lang/initexc.out |