< prev index next >
test/compiler/c2/Test6832293.java
Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke
@@ -24,56 +24,61 @@
/*
* @test
* @bug 6832293
* @summary JIT compiler got wrong result in type checking with -server
- * @run main/othervm -Xcomp -XX:CompileOnly=Test.run Test
+ *
+ * @run main/othervm -Xcomp
+ * -XX:CompileCommand=compileonly,compiler.c2.Test6832293::run
+ * compiler.c2.Test6832293
*/
+package compiler.c2;
+
import java.io.PrintStream;
-interface SomeInterface {
+public class Test6832293 {
+ static interface SomeInterface {
int SEVENS = 777;
-}
+ }
-interface AnotherInterface {
+ static interface AnotherInterface {
int THIRDS = 33;
-}
+ }
-class SomeClass implements SomeInterface {
+ static class SomeClass implements SomeInterface {
int i;
SomeClass(int i) {
this.i = i;
}
-}
+ }
-class ImmediateSubclass extends SomeClass implements SomeInterface {
+ static class ImmediateSubclass extends SomeClass implements SomeInterface {
float f;
ImmediateSubclass(int i, float f) {
super(i);
this.f = f;
}
-}
+ }
-final class FinalSubclass extends ImmediateSubclass implements AnotherInterface {
+ static final class FinalSubclass extends ImmediateSubclass implements AnotherInterface {
double d;
FinalSubclass(int i, float f, double d) {
super(i, f);
this.d = d;
}
-}
+ }
-public class Test {
-
public static void main(String args[]) throws Exception{
/* try to pre initialize */
SomeClass[] a=new SomeClass[10];
- Class.forName("ImmediateSubclass");
- Class.forName("FinalSubclass");
+ String className = Test6832293.class.getName();
+ Class.forName(className + "$ImmediateSubclass");
+ Class.forName(className + "$FinalSubclass");
System.exit(run(args, System.out) + 95/*STATUS_TEMP*/);
}
static int errorStatus = 0/*STATUS_PASSED*/;
< prev index next >