aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/libjava/testsuite/libjava.lang/stub.java
diff options
context:
space:
mode:
authorJing Yu <jingyu@google.com>2011-12-19 16:56:54 -0800
committerJing Yu <jingyu@google.com>2011-12-19 16:56:54 -0800
commit40d7cd0fd78fe2004e2a53c4618c148339b02733 (patch)
tree5874557a6c86a1f564a03e5f28b266e31bc3759c /gcc-4.6/libjava/testsuite/libjava.lang/stub.java
parentfe2afdf3f3701489c05d2a7509752d6f0c7616f7 (diff)
downloadtoolchain_gcc-40d7cd0fd78fe2004e2a53c4618c148339b02733.tar.gz
toolchain_gcc-40d7cd0fd78fe2004e2a53c4618c148339b02733.tar.bz2
toolchain_gcc-40d7cd0fd78fe2004e2a53c4618c148339b02733.zip
Add gcc-4.6. Synced to @180989
Change-Id: Ie3676586e1d8e3c8cd9f07d022f450d05fa08439 svn://gcc.gnu.org/svn/gcc/branches/google/gcc-4_6-mobile
Diffstat (limited to 'gcc-4.6/libjava/testsuite/libjava.lang/stub.java')
-rw-r--r--gcc-4.6/libjava/testsuite/libjava.lang/stub.java101
1 files changed, 101 insertions, 0 deletions
diff --git a/gcc-4.6/libjava/testsuite/libjava.lang/stub.java b/gcc-4.6/libjava/testsuite/libjava.lang/stub.java
new file mode 100644
index 000000000..dfda004b3
--- /dev/null
+++ b/gcc-4.6/libjava/testsuite/libjava.lang/stub.java
@@ -0,0 +1,101 @@
+// Class stub
+// Generated on Fri Feb 4 20:23:47 PST 2000
+// A somewhat thorough test of function invocator generated stubs.
+
+class stub {
+
+ String ok;
+
+ void OK () {System.out.println (ok);}
+ void OK (int i) {System.out.println (ok+" "+i);}
+ static void testOK () {System.out.println ("OK");}
+ static void testOK (int i) {System.out.println ("OK "+i); }
+
+ // STATIC PRIVATE R_VALUE ARGS
+ // No No No No
+ void t1 () {OK();}
+ // Yes No No No
+ static void t2 () {testOK();}
+ // No Yes No No
+ private void t3 () {OK();}
+ // Yes Yes No No
+ static private void t4 () {testOK();}
+ // No No Yes No
+ int t5 () {return 5;}
+ // Yes No Yes No
+ static int t6 () {return 6;}
+ // No Yes Yes No
+ private int t7 () {return 7;}
+ // Yes Yes Yes No
+ static private int t8 () {return 8;}
+
+ // No No No Yes
+ void t9 (int i) {OK(i);}
+ // Yes No No Yes
+ static void t10 (int i) {testOK(i);}
+ // No Yes No Yes
+ private void t11 (int i) {OK(i);}
+ // Yes Yes No Yes
+ static private void t12 (int i) {testOK(i);}
+ // No No Yes Yes
+ int t13 (int i) {return i*2;}
+ // Yes No Yes Yes
+ static int t14 (int i) {return i*3;}
+ // No Yes Yes Yes
+ private int t15 (int i) {return i*4;}
+ // Yes Yes Yes Yes
+ static private int t16 (int i) {return i*5;}
+
+ void foo ()
+ {
+ this.new bar ().test ();
+ }
+ class bar {
+ void test () {
+ ok = "OK";
+ t1 ();
+ t2 ();
+ t3 ();
+ t4 ();
+ System.out.println (t5());
+ System.out.println (t6());
+ System.out.println (t7());
+ System.out.println (t8());
+ t9 (9);
+ t10 (10);
+ t11 (11);
+ t12 (12);
+ System.out.println (t13(13));
+ System.out.println (t14(14));
+ System.out.println (t15(15));
+ System.out.println (t16(16));
+ this.new baz ().test ();
+ }
+ class baz {
+ void test () {
+ ok = "OKOK";
+ t1 ();
+ t2 ();
+ t3 ();
+ t4 ();
+ System.out.println (t5());
+ System.out.println (t6());
+ System.out.println (t7());
+ System.out.println (t8());
+ t9 (9);
+ t10 (10);
+ t11 (11);
+ t12 (12);
+ System.out.println (t13(13));
+ System.out.println (t14(14));
+ System.out.println (t15(15));
+ System.out.println (t16(16));
+ }
+ }
+ }
+ public static void main (String[] arg)
+ {
+ System.out.println ("Testing class `stub'...");
+ new stub ().foo ();
+ }
+}