* MAINTAINERS (nvptx): Add self.
[official-gcc.git] / libjava / testsuite / libjava.lang / pr179.java
blob9fd4657e893140fa808d72444260558434977522
1 // Extended regression test for the PR 179.
2 //
3 // This tests the ".class" language syntax, initialization behaviour for
4 // Class.isInstance() and Class.isAssignableFrom(), and isAssignableFrom()
5 // functionality in the event that an interface argument that is not
6 // implemented by any loaded class is given.
7 // Note that the desired output changed from 1.4 to 1.5.
9 class A
11 static
13 System.out.println("A initialized");
17 interface IA {}
19 class B implements IA
21 static
23 System.out.println("B initialized");
27 class C
29 static
31 System.out.println("C initialized");
35 interface IB {}
37 public class pr179
39 public static void main(String[] args)
41 System.out.println (A.class.isAssignableFrom (Object.class));
42 System.out.println (IB.class.isAssignableFrom (B.class));
43 System.out.println (IA.class.isAssignableFrom (B.class));
44 A a = new A();
45 System.out.println (C.class.isInstance (a));
46 C c = new C();
47 System.out.println (C.class.isInstance (c));