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
This commit is contained in:
Tom Tromey 2000-03-22 21:25:21 +00:00 committed by Tom Tromey
parent 9ffccc97f5
commit 26356fee5b
22 changed files with 165 additions and 0 deletions

View File

@ -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:

View File

@ -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 ();
}
}

View File

@ -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 {
}

View File

@ -0,0 +1,6 @@
package bar.foo;
// This is not a redef.
class not_a_redef {
class baz { class bar { class foo {}} class foo {}}
}

View File

@ -0,0 +1,6 @@
package bar.foo;
// A case of innerclass redefinition
class redef1 {
class redef1 {}
}

View File

@ -0,0 +1 @@
shouldfail

View File

@ -0,0 +1,6 @@
package bar.foo;
// A case of innerclass redefinition
class redef2 {
class foo {class redef2{}}
}

View File

@ -0,0 +1 @@
shouldfail

View File

@ -0,0 +1,6 @@
package bar.foo;
// A case of innerclass redefinition
class redef3 {
class foo { class bar {} class bar {}}
}

View File

@ -0,0 +1 @@
shouldfail

View File

@ -0,0 +1,6 @@
package bar.foo;
// A case of innerclass redefinition
class redef4 {
class foo { class bar { class foo {}}}
}

View File

@ -0,0 +1 @@
shouldfail

View File

@ -0,0 +1,6 @@
package bar.foo;
// Redefining and stuffing the redefined class with something
class redef5 {
class redef5 {void foobar() {}}
}

View File

@ -0,0 +1 @@
shouldfail

View File

@ -0,0 +1,6 @@
package bar.foo;
// Redefining and stuffing the redefined class with something
class redef6 {
class redef6 {int foo;}
}

View File

@ -0,0 +1 @@
shouldfail

View File

@ -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
}
}

View File

@ -0,0 +1 @@
shouldfail

View File

@ -0,0 +1,10 @@
package bar.foo;
class static_2 {
static class koink {
static int i;
static void foo (){}
static {}
static class foo {}
}
}

View File

@ -0,0 +1,5 @@
package bar.foo;
class static_3 {
static class zoink { static class zork {}}
}

View File

@ -0,0 +1,4 @@
class static_init
{
native { }
}

View File

@ -0,0 +1 @@
shouldfail