aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tromey@cygnus.com>2000-03-22 21:25:21 +0000
committerTom Tromey <tromey@gcc.gnu.org>2000-03-22 21:25:21 +0000
commit26356fee5ba5a558889329f911024af9e77351ec (patch)
tree6e3edd4a516558ce8cdda33a69a5dff2e75a6d11 /libjava/testsuite
parent9ffccc97f575eae67b2db66bd18fbc98eb8fef48 (diff)
downloadgcc-26356fee5ba5a558889329f911024af9e77351ec.zip
gcc-26356fee5ba5a558889329f911024af9e77351ec.tar.gz
gcc-26356fee5ba5a558889329f911024af9e77351ec.tar.bz2
iface.java: New file.
* libjava.compile/iface.java: New file. * libjava.compile/static_3.java: New file. * libjava.compile/static_2.java: New file. * libjava.compile/static_1.xfail: New file. * libjava.compile/static_1.java: New file. * libjava.compile/redef6.xfail: New file. * libjava.compile/redef6.java: New file. * libjava.compile/redef5.xfail: New file. * libjava.compile/redef5.java: New file. * libjava.compile/redef4.xfail: New file. * libjava.compile/redef4.java: New file. * libjava.compile/redef3.xfail: New file. * libjava.compile/redef3.java: New file. * libjava.compile/redef2.xfail: New file. * libjava.compile/redef2.java: New file. * libjava.compile/redef1.xfail: New file. * libjava.compile/redef1.java: New file. * libjava.compile/not_a_redef.java: New file. * libjava.compile/inner_1.java: New file. * libjava.compile/static_init.xfail: New file. * libjava.compile/static_init.java: New file. From-SVN: r32688
Diffstat (limited to 'libjava/testsuite')
-rw-r--r--libjava/testsuite/ChangeLog24
-rw-r--r--libjava/testsuite/libjava.compile/iface.java24
-rw-r--r--libjava/testsuite/libjava.compile/inner_1.java36
-rw-r--r--libjava/testsuite/libjava.compile/not_a_redef.java6
-rw-r--r--libjava/testsuite/libjava.compile/redef1.java6
-rw-r--r--libjava/testsuite/libjava.compile/redef1.xfail1
-rw-r--r--libjava/testsuite/libjava.compile/redef2.java6
-rw-r--r--libjava/testsuite/libjava.compile/redef2.xfail1
-rw-r--r--libjava/testsuite/libjava.compile/redef3.java6
-rw-r--r--libjava/testsuite/libjava.compile/redef3.xfail1
-rw-r--r--libjava/testsuite/libjava.compile/redef4.java6
-rw-r--r--libjava/testsuite/libjava.compile/redef4.xfail1
-rw-r--r--libjava/testsuite/libjava.compile/redef5.java6
-rw-r--r--libjava/testsuite/libjava.compile/redef5.xfail1
-rw-r--r--libjava/testsuite/libjava.compile/redef6.java6
-rw-r--r--libjava/testsuite/libjava.compile/redef6.xfail1
-rw-r--r--libjava/testsuite/libjava.compile/static_1.java12
-rw-r--r--libjava/testsuite/libjava.compile/static_1.xfail1
-rw-r--r--libjava/testsuite/libjava.compile/static_2.java10
-rw-r--r--libjava/testsuite/libjava.compile/static_3.java5
-rw-r--r--libjava/testsuite/libjava.compile/static_init.java4
-rw-r--r--libjava/testsuite/libjava.compile/static_init.xfail1
22 files changed, 165 insertions, 0 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog
index aa590b0..2f5a6b71 100644
--- a/libjava/testsuite/ChangeLog
+++ b/libjava/testsuite/ChangeLog
@@ -1,3 +1,27 @@
+2000-03-22 Tom Tromey <tromey@cygnus.com>
+
+ * libjava.compile/iface.java: New file.
+ * libjava.compile/static_3.java: New file.
+ * libjava.compile/static_2.java: New file.
+ * libjava.compile/static_1.xfail: New file.
+ * libjava.compile/static_1.java: New file.
+ * libjava.compile/redef6.xfail: New file.
+ * libjava.compile/redef6.java: New file.
+ * libjava.compile/redef5.xfail: New file.
+ * libjava.compile/redef5.java: New file.
+ * libjava.compile/redef4.xfail: New file.
+ * libjava.compile/redef4.java: New file.
+ * libjava.compile/redef3.xfail: New file.
+ * libjava.compile/redef3.java: New file.
+ * libjava.compile/redef2.xfail: New file.
+ * libjava.compile/redef2.java: New file.
+ * libjava.compile/redef1.xfail: New file.
+ * libjava.compile/redef1.java: New file.
+ * libjava.compile/not_a_redef.java: New file.
+ * libjava.compile/inner_1.java: New file.
+ * libjava.compile/static_init.xfail: New file.
+ * libjava.compile/static_init.java: New file.
+
2000-03-21 Bryce McKinlay <bryce@albatross.co.nz>
Test case for PR libgcj/179:
diff --git a/libjava/testsuite/libjava.compile/iface.java b/libjava/testsuite/libjava.compile/iface.java
new file mode 100644
index 0000000..6a57fcf
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/iface.java
@@ -0,0 +1,24 @@
+// Test for searching through interface extension.
+
+interface basei
+{
+ public int method ();
+}
+
+interface basei2
+{
+ public int confuse ();
+}
+
+interface derivedi extends basei, basei2
+{
+ public void nothing ();
+}
+
+public class iface
+{
+ public int try_it (derivedi x)
+ {
+ return x.method ();
+ }
+}
diff --git a/libjava/testsuite/libjava.compile/inner_1.java b/libjava/testsuite/libjava.compile/inner_1.java
new file mode 100644
index 0000000..d9a0210
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/inner_1.java
@@ -0,0 +1,36 @@
+// inner class regression test.
+
+package bar.foo;
+
+class other {
+ class foo {}
+}
+
+class inner_1 {
+ static void bar () {
+ inner_1 xxxx; // Refers to inner_1
+ bar.foo.another xyz; // Refers to non inner another
+ bar.foo.other.foo X; // OK to declare, inner class foo
+ bar.foo.inner_1.t bar; // Inner class t
+ inner_1.t foo; // Inner class t
+ t foobar; // Inner class t
+ other.foo zag; // Valid for declaration.
+ t.ungah x;
+ }
+ void foo () {
+ // z.t.u foo;
+ t t1 = new t();
+ t1.print ();
+ new t().print();
+ }
+
+ class t {
+ void print () {
+ System.out.println ("This is `inner_1.t'");
+ }
+ class ungah {}
+ }
+}
+
+class another {
+}
diff --git a/libjava/testsuite/libjava.compile/not_a_redef.java b/libjava/testsuite/libjava.compile/not_a_redef.java
new file mode 100644
index 0000000..7a2f55c
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/not_a_redef.java
@@ -0,0 +1,6 @@
+package bar.foo;
+// This is not a redef.
+
+class not_a_redef {
+ class baz { class bar { class foo {}} class foo {}}
+}
diff --git a/libjava/testsuite/libjava.compile/redef1.java b/libjava/testsuite/libjava.compile/redef1.java
new file mode 100644
index 0000000..a3e138a
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/redef1.java
@@ -0,0 +1,6 @@
+package bar.foo;
+// A case of innerclass redefinition
+
+class redef1 {
+ class redef1 {}
+}
diff --git a/libjava/testsuite/libjava.compile/redef1.xfail b/libjava/testsuite/libjava.compile/redef1.xfail
new file mode 100644
index 0000000..e3b083b
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/redef1.xfail
@@ -0,0 +1 @@
+shouldfail
diff --git a/libjava/testsuite/libjava.compile/redef2.java b/libjava/testsuite/libjava.compile/redef2.java
new file mode 100644
index 0000000..9f8e5b8
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/redef2.java
@@ -0,0 +1,6 @@
+package bar.foo;
+// A case of innerclass redefinition
+
+class redef2 {
+ class foo {class redef2{}}
+}
diff --git a/libjava/testsuite/libjava.compile/redef2.xfail b/libjava/testsuite/libjava.compile/redef2.xfail
new file mode 100644
index 0000000..e3b083b
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/redef2.xfail
@@ -0,0 +1 @@
+shouldfail
diff --git a/libjava/testsuite/libjava.compile/redef3.java b/libjava/testsuite/libjava.compile/redef3.java
new file mode 100644
index 0000000..df638f1
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/redef3.java
@@ -0,0 +1,6 @@
+package bar.foo;
+// A case of innerclass redefinition
+
+class redef3 {
+ class foo { class bar {} class bar {}}
+}
diff --git a/libjava/testsuite/libjava.compile/redef3.xfail b/libjava/testsuite/libjava.compile/redef3.xfail
new file mode 100644
index 0000000..e3b083b
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/redef3.xfail
@@ -0,0 +1 @@
+shouldfail
diff --git a/libjava/testsuite/libjava.compile/redef4.java b/libjava/testsuite/libjava.compile/redef4.java
new file mode 100644
index 0000000..db4f499
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/redef4.java
@@ -0,0 +1,6 @@
+package bar.foo;
+// A case of innerclass redefinition
+
+class redef4 {
+ class foo { class bar { class foo {}}}
+}
diff --git a/libjava/testsuite/libjava.compile/redef4.xfail b/libjava/testsuite/libjava.compile/redef4.xfail
new file mode 100644
index 0000000..e3b083b
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/redef4.xfail
@@ -0,0 +1 @@
+shouldfail
diff --git a/libjava/testsuite/libjava.compile/redef5.java b/libjava/testsuite/libjava.compile/redef5.java
new file mode 100644
index 0000000..2698e0f
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/redef5.java
@@ -0,0 +1,6 @@
+package bar.foo;
+// Redefining and stuffing the redefined class with something
+
+class redef5 {
+ class redef5 {void foobar() {}}
+}
diff --git a/libjava/testsuite/libjava.compile/redef5.xfail b/libjava/testsuite/libjava.compile/redef5.xfail
new file mode 100644
index 0000000..e3b083b
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/redef5.xfail
@@ -0,0 +1 @@
+shouldfail
diff --git a/libjava/testsuite/libjava.compile/redef6.java b/libjava/testsuite/libjava.compile/redef6.java
new file mode 100644
index 0000000..1489d5e
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/redef6.java
@@ -0,0 +1,6 @@
+package bar.foo;
+// Redefining and stuffing the redefined class with something
+
+class redef6 {
+ class redef6 {int foo;}
+}
diff --git a/libjava/testsuite/libjava.compile/redef6.xfail b/libjava/testsuite/libjava.compile/redef6.xfail
new file mode 100644
index 0000000..e3b083b
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/redef6.xfail
@@ -0,0 +1 @@
+shouldfail
diff --git a/libjava/testsuite/libjava.compile/static_1.java b/libjava/testsuite/libjava.compile/static_1.java
new file mode 100644
index 0000000..ff01a1e
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/static_1.java
@@ -0,0 +1,12 @@
+package bar.foo;
+
+class static_1 {
+ class bar {
+ // No Static members: methods, fields, inner classes.
+ static int foo;
+ static int xyzzy (){return 0;}
+ static {}
+ static class foo {}
+ // No Member interface FIXME
+ }
+}
diff --git a/libjava/testsuite/libjava.compile/static_1.xfail b/libjava/testsuite/libjava.compile/static_1.xfail
new file mode 100644
index 0000000..e3b083b
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/static_1.xfail
@@ -0,0 +1 @@
+shouldfail
diff --git a/libjava/testsuite/libjava.compile/static_2.java b/libjava/testsuite/libjava.compile/static_2.java
new file mode 100644
index 0000000..fdb5b99
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/static_2.java
@@ -0,0 +1,10 @@
+package bar.foo;
+
+class static_2 {
+ static class koink {
+ static int i;
+ static void foo (){}
+ static {}
+ static class foo {}
+ }
+}
diff --git a/libjava/testsuite/libjava.compile/static_3.java b/libjava/testsuite/libjava.compile/static_3.java
new file mode 100644
index 0000000..894e579
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/static_3.java
@@ -0,0 +1,5 @@
+package bar.foo;
+
+class static_3 {
+ static class zoink { static class zork {}}
+}
diff --git a/libjava/testsuite/libjava.compile/static_init.java b/libjava/testsuite/libjava.compile/static_init.java
new file mode 100644
index 0000000..2e77b5e
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/static_init.java
@@ -0,0 +1,4 @@
+class static_init
+{
+ native { }
+}
diff --git a/libjava/testsuite/libjava.compile/static_init.xfail b/libjava/testsuite/libjava.compile/static_init.xfail
new file mode 100644
index 0000000..e3b083b
--- /dev/null
+++ b/libjava/testsuite/libjava.compile/static_init.xfail
@@ -0,0 +1 @@
+shouldfail