From 8a14e6e1acc041e07a8a94d6e6f355729efc6cda Mon Sep 17 00:00:00 2001 From: Ranjit Mathew Date: Tue, 16 Aug 2005 18:32:14 +0000 Subject: [PATCH] More testsuite adjustments for PR java/19870. * testsuite/libjava.lang/PR19870_2.java: New testcase. * testsuite/libjava.lang/PR19870_2.out: Expected output for the new testcase. * testsuite/libjava.jacks/jacks.xfail: Remove 8.5.2-non-static-member-usage-2 and add 15.12.3-explicit-constructor-9. From-SVN: r103165 --- libjava/ChangeLog | 9 +++++ libjava/testsuite/libjava.jacks/jacks.xfail | 2 +- libjava/testsuite/libjava.lang/PR19870_2.java | 39 +++++++++++++++++++ libjava/testsuite/libjava.lang/PR19870_2.out | 5 +++ 4 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 libjava/testsuite/libjava.lang/PR19870_2.java create mode 100644 libjava/testsuite/libjava.lang/PR19870_2.out diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 574d211adef..b58b012bd9d 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,12 @@ +2005-08-16 Ranjit Mathew + + More testsuite adjustments for PR java/19870. + * testsuite/libjava.lang/PR19870_2.java: New testcase. + * testsuite/libjava.lang/PR19870_2.out: Expected output for the + new testcase. + * testsuite/libjava.jacks/jacks.xfail: Remove + 8.5.2-non-static-member-usage-2 and add 15.12.3-explicit-constructor-9. + 2005-08-16 Tom Tromey * gnu/xml/xpath/XPathParser.y: Removed. diff --git a/libjava/testsuite/libjava.jacks/jacks.xfail b/libjava/testsuite/libjava.jacks/jacks.xfail index 0472b55a26d..eb5cd9cf1e2 100644 --- a/libjava/testsuite/libjava.jacks/jacks.xfail +++ b/libjava/testsuite/libjava.jacks/jacks.xfail @@ -174,6 +174,7 @@ 15.12.3-explicit-constructor-4 15.12.3-explicit-constructor-5 15.12.3-explicit-constructor-7 +15.12.3-explicit-constructor-9 15.12.3-runtime-mode-1 15.12.3-runtime-mode-2 15.12.3-runtime-mode-3 @@ -608,7 +609,6 @@ 8.5-inheritance-3 8.5-inheritance-6 8.5.2-accessible-static-member-usage-3 -8.5.2-non-static-member-usage-2 8.5.2-non-static-member-usage-4 8.5.2-non-static-member-usage-5 8.6-abrupt-1 diff --git a/libjava/testsuite/libjava.lang/PR19870_2.java b/libjava/testsuite/libjava.lang/PR19870_2.java new file mode 100644 index 00000000000..4dd7c7fa9a1 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR19870_2.java @@ -0,0 +1,39 @@ +// PR19870: Test synthetic accessor generation for private static methods +// accessed across nested class boundaries. +public class PR19870_2 +{ + static class A + { + private static void foo( ) + { + System.out.println( "1"); + } + + private static void bar( int x) + { + System.out.println( x); + snafu( ); + PR19870_2.snafu( ); + } + } + + static class B + { + private static void foo( ) + { + A.foo( ); + } + } + + private static void snafu( ) + { + System.out.println( "3"); + } + + public static void main( String[] args) + { + A.foo( ); + A.bar( 2); + B.foo( ); + } +} diff --git a/libjava/testsuite/libjava.lang/PR19870_2.out b/libjava/testsuite/libjava.lang/PR19870_2.out new file mode 100644 index 00000000000..bab394589b2 --- /dev/null +++ b/libjava/testsuite/libjava.lang/PR19870_2.out @@ -0,0 +1,5 @@ +1 +2 +3 +3 +1