anon_ctor_itf_arg.java: Moved to `libjava.lang.'
authorAlexandre Petit-Bianco <apbianco@redhat.com>
Fri, 13 Jul 2001 19:45:05 +0000 (12:45 -0700)
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>
Fri, 13 Jul 2001 19:45:05 +0000 (12:45 -0700)
2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>

* libjava.compile/anon_ctor_itf_arg.java: Moved to `libjava.lang.'
* libjava.compile/anon_ctor_itf_arg.out: Likewise
* libjava.lang/invoke_from_inner.java: New file.
* libjava.lang/invoke_from_inner.out: Likewise.

(http://gcc.gnu.org/ml/java-patches/2001-q3/msg00061.html )

From-SVN: r43994

libjava/testsuite/ChangeLog
libjava/testsuite/libjava.compile/anon_ctor_itf_arg.java [deleted file]
libjava/testsuite/libjava.compile/anon_ctor_itf_arg.out [deleted file]
libjava/testsuite/libjava.lang/anon_ctor_itf_arg.java [new file with mode: 0644]
libjava/testsuite/libjava.lang/anon_ctor_itf_arg.out [new file with mode: 0644]
libjava/testsuite/libjava.lang/invoke_from_inner.java [new file with mode: 0644]
libjava/testsuite/libjava.lang/invoke_from_inner.out [new file with mode: 0644]

index 3ca3d52a132f4bc62e93cc1aaa255370dec28211..8c9acc42b1b5fa656847aef9704b2637c044175f 100644 (file)
@@ -1,3 +1,10 @@
+2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
+
+       * libjava.compile/anon_ctor_itf_arg.java: Moved to `libjava.lang.'
+       * libjava.compile/anon_ctor_itf_arg.out: Likewise
+       * libjava.lang/invoke_from_inner.java: New file.
+       * libjava.lang/invoke_from_inner.out: Likewise.
+
 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
 
        * libjava.compile/anon_ctor_itf_arg.java: New file.
diff --git a/libjava/testsuite/libjava.compile/anon_ctor_itf_arg.java b/libjava/testsuite/libjava.compile/anon_ctor_itf_arg.java
deleted file mode 100644 (file)
index 1fd16f1..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* From java/3285, By p.thio@valescom.com */
-
-interface I
-{
-    void print ();
-};
-
-class C1
-implements I
-{
-    public void print () { System.out.println ("C1: Message"); }
-}
-
-abstract
-class C2
-{
-    C2(I i)
-    {
-       i.print ();
-    }
-    abstract void h();
-}
-
-public
-class anon_ctor_itf_arg
-{
-    public static
-    void main(String argv[])
-    {
-        C1 c1 = new C1();
-        new C2(c1)
-        {
-            void h()
-            {
-            }
-        };
-    }
-}
diff --git a/libjava/testsuite/libjava.compile/anon_ctor_itf_arg.out b/libjava/testsuite/libjava.compile/anon_ctor_itf_arg.out
deleted file mode 100644 (file)
index abddf8e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-C1: Message
diff --git a/libjava/testsuite/libjava.lang/anon_ctor_itf_arg.java b/libjava/testsuite/libjava.lang/anon_ctor_itf_arg.java
new file mode 100644 (file)
index 0000000..1fd16f1
--- /dev/null
@@ -0,0 +1,38 @@
+/* From java/3285, By p.thio@valescom.com */
+
+interface I
+{
+    void print ();
+};
+
+class C1
+implements I
+{
+    public void print () { System.out.println ("C1: Message"); }
+}
+
+abstract
+class C2
+{
+    C2(I i)
+    {
+       i.print ();
+    }
+    abstract void h();
+}
+
+public
+class anon_ctor_itf_arg
+{
+    public static
+    void main(String argv[])
+    {
+        C1 c1 = new C1();
+        new C2(c1)
+        {
+            void h()
+            {
+            }
+        };
+    }
+}
diff --git a/libjava/testsuite/libjava.lang/anon_ctor_itf_arg.out b/libjava/testsuite/libjava.lang/anon_ctor_itf_arg.out
new file mode 100644 (file)
index 0000000..abddf8e
--- /dev/null
@@ -0,0 +1 @@
+C1: Message
diff --git a/libjava/testsuite/libjava.lang/invoke_from_inner.java b/libjava/testsuite/libjava.lang/invoke_from_inner.java
new file mode 100644 (file)
index 0000000..8659ac6
--- /dev/null
@@ -0,0 +1,37 @@
+// This test case once showed that `f[0].execute(x)' woudln't be
+// expanded properly, attempting to retrieve this$0 to be used in
+// place of `f[0]'.
+
+abstract class A {
+    abstract public void execute(C x);
+}
+
+class C {}
+
+class Z extends A {
+    public void execute (C x) {
+       System.out.println ("Z.execute");
+    }
+}
+
+public class invoke_from_inner extends A {
+
+    Z f[] = new Z[1];
+    class D extends C {
+       D (C x) {
+           f[0].execute (x);
+           execute (x);
+       }
+    }
+    public void execute (C x) {
+      System.out.println ("invoke_from_inner.execute");
+    }
+
+    public static void main (String a[]) {
+       new invoke_from_inner().foo();
+    }
+    void foo () {
+       f[0] = new Z();
+       new D(new C());
+    }
+}
diff --git a/libjava/testsuite/libjava.lang/invoke_from_inner.out b/libjava/testsuite/libjava.lang/invoke_from_inner.out
new file mode 100644 (file)
index 0000000..1911e2f
--- /dev/null
@@ -0,0 +1,2 @@
+Z.execute
+invoke_from_inner.execute