diff options
author | Tom Tromey <tromey@cygnus.com> | 2000-03-06 06:05:02 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2000-03-06 06:05:02 +0000 |
commit | fc159ae11b8797b777f1fb26dfa5dc1ac29274df (patch) | |
tree | 19de468a694727520b908ff8c4516955d02b5352 /libjava/testsuite/lib/libjava.exp | |
parent | 8cf870df7bec58d79f3e69249ad5dc05a234ea5c (diff) | |
download | gcc-fc159ae11b8797b777f1fb26dfa5dc1ac29274df.zip gcc-fc159ae11b8797b777f1fb26dfa5dc1ac29274df.tar.gz gcc-fc159ae11b8797b777f1fb26dfa5dc1ac29274df.tar.bz2 |
re GNATS gcj/124 (protected constructor for InvocationTargetException still visible)
* lib/libjava.exp (test_libjava): Document `shouldfail' token.
(test_libjava_from_source): Handle `shouldfail' case.
(test_libjava_from_javac): Likewise.
Test for PR libgcj/124:
* libjava.compile/PR124.java: New file.
* libjava.compile/PR124.xfail: New file.
From-SVN: r32353
Diffstat (limited to 'libjava/testsuite/lib/libjava.exp')
-rw-r--r-- | libjava/testsuite/lib/libjava.exp | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp index 341b2de..797741b 100644 --- a/libjava/testsuite/lib/libjava.exp +++ b/libjava/testsuite/lib/libjava.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1998, 1999 Red Hat, Inc. +# Copyright (C) 1998, 1999, 2000 Red Hat, Inc. load_lib "libgloss.exp" @@ -275,6 +275,11 @@ proc libjava_arguments {{mode compile}} { # `xfail-gcj' compilation from source will fail # `xfail-javac' compilation with javac will fail # `xfail-gcjC' compilation with gcj -C will fail +# `shouldfail' compilation from source is supposed to fail +# This is different from xfail, which marks a known +# failure that we just havne't fixed. +# A compilation marked this way should fail with any +# front end. # `xfail-byte' compilation from bytecode will fail # `xfail-exec' exec will fail # `xfail-output' output will be wrong @@ -334,6 +339,12 @@ proc test_libjava_from_source { options srcfile compile_args inpfile resultfile } if { $x != "" } { verbose "target_compile failed: $x" 2 + + if {[info exists opts(shouldfail)]} { + pass "$errname compilation from source" + return + } + fail "$errname compilation from source" if {[info exists opts(xfail-gcj)] || ! [info exists opts(no-exec)]} { setup_xfail "*-*-*" @@ -341,7 +352,11 @@ proc test_libjava_from_source { options srcfile compile_args inpfile resultfile setup_xfail "*-*-*" fail "$errname output from source compiled test" } - return; + return + } + if {[info exists opts(shouldfail)]} { + fail "$errname compilation from source" + return } pass "$errname compilation from source" @@ -409,6 +424,11 @@ proc test_libjava_from_source { options srcfile compile_args inpfile resultfile # `xfail-gcj' compilation from source will fail # `xfail-javac' compilation with javac will fail # `xfail-gcjC' compilation with gcj -C will fail +# `shouldfail' compilation from source is supposed to fail +# This is different from xfail, which marks a known +# failure that we just havne't fixed. +# A compilation marked this way should fail with any +# front end. # `xfail-byte' compilation from bytecode will fail # `xfail-exec' exec will fail # `xfail-output' output will be wrong @@ -443,6 +463,10 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e setup_xfail *-*-* } if {! $bc_ok} then { + if {[info exists opts(shouldfail)]} { + pass "$errname byte compilation" + return + } fail "$errname byte compilation" setup_xfail "*-*-*" fail "$errname compilation from bytecode" @@ -454,6 +478,10 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e } return } + if {[info exists opts(shouldfail)]} { + fail "$errname byte compilation" + return + } pass "$errname byte compilation" # Find name to use for --main, and name of all class files. @@ -607,10 +635,15 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e # Run the test specified by srcfile and resultfile. compile_args and # exec_args are options telling this proc how to work. # `no-link' don't try to link the program -# `no-exec' don't try to run the test +# `no-exec' don't try to run the test # `xfail-gcj' compilation from source will fail # `xfail-javac' compilation with javac will fail # `xfail-gcjC' compilation with gcj -C will fail +# `shouldfail' compilation from source is supposed to fail +# This is different from xfail, which marks a known +# failure that we just havne't fixed. +# A compilation marked this way should fail with any +# front end. # `xfail-byte' compilation from bytecode will fail # `xfail-exec' exec will fail # `xfail-output' output will be wrong |