This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] New test case + test cases location correction.



When I'm done testing the patch to fix Hans' calculator problem, I'll
be most likely checking this in. This patch also changes the location
of the last test case I committed.

./A

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.

Index: libjava.compile/anon_ctor_itf_arg.java
===================================================================
RCS file: anon_ctor_itf_arg.java
diff -N anon_ctor_itf_arg.java
--- /sourceware/cvs-tmp/cvseVpXlC	Thu Jul 12 22:38:51 2001
+++ /dev/null	Tue May  5 13:32:27 1998
@@ -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()
-            {
-            }
-        };
-    }
-}
Index: libjava.compile/anon_ctor_itf_arg.out
===================================================================
RCS file: anon_ctor_itf_arg.out
diff -N anon_ctor_itf_arg.out
--- /sourceware/cvs-tmp/cvsBECy0m	Thu Jul 12 22:38:51 2001
+++ /dev/null	Tue May  5 13:32:27 1998
@@ -1 +0,0 @@
-C1: Message
Index: libjava.compile/invoke_from_inner.java
===================================================================
RCS file: invoke_from_inner.java
diff -N invoke_from_inner.java
Index: libjava.lang/anon_ctor_itf_arg.java
===================================================================
RCS file: anon_ctor_itf_arg.java
diff -N anon_ctor_itf_arg.java
--- /dev/null	Tue May  5 13:32:27 1998
+++ anon_ctor_itf_arg.java	Thu Jul 12 22:38:51 2001
@@ -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()
+            {
+            }
+        };
+    }
+}
Index: libjava.lang/anon_ctor_itf_arg.out
===================================================================
RCS file: anon_ctor_itf_arg.out
diff -N anon_ctor_itf_arg.out
--- /dev/null	Tue May  5 13:32:27 1998
+++ anon_ctor_itf_arg.out	Thu Jul 12 22:38:51 2001
@@ -0,0 +1 @@
+C1: Message
Index: libjava.lang/invoke_from_inner.java
===================================================================
RCS file: invoke_from_inner.java
diff -N invoke_from_inner.java
--- /dev/null	Tue May  5 13:32:27 1998
+++ invoke_from_inner.java	Thu Jul 12 22:38:51 2001
@@ -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());
+    }
+}
Index: libjava.lang/invoke_from_inner.out
===================================================================
RCS file: invoke_from_inner.out
diff -N invoke_from_inner.out
--- /dev/null	Tue May  5 13:32:27 1998
+++ invoke_from_inner.out	Thu Jul 12 22:38:51 2001
@@ -0,0 +1,2 @@
+Z.execute
+invoke_from_inner.execute


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]