< prev index next >

test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java

Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke


  23 
  24 /*
  25  * @test
  26  * @bug 8136421
  27  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  28  * @library / /testlibrary /test/lib
  29  * @library ../common/patches
  30  * @modules java.base/jdk.internal.misc
  31  * @modules java.base/jdk.internal.org.objectweb.asm
  32  *          java.base/jdk.internal.org.objectweb.asm.tree
  33  *          jdk.vm.ci/jdk.vm.ci.hotspot
  34  *          jdk.vm.ci/jdk.vm.ci.code
  35  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
  36  * @build compiler.jvmci.compilerToVM.GetVtableIndexForInterfaceTest
  37  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  38  *                   compiler.jvmci.compilerToVM.GetVtableIndexForInterfaceTest
  39  */
  40 
  41 package compiler.jvmci.compilerToVM;
  42 

  43 import compiler.jvmci.common.testcases.AbstractClass;


  44 import compiler.jvmci.common.testcases.DoNotExtendClass;
  45 import compiler.jvmci.common.testcases.MultipleAbstractImplementer;
  46 import compiler.jvmci.common.testcases.MultipleImplementersInterface;
  47 import compiler.jvmci.common.testcases.MultipleImplementersInterfaceExtender;
  48 import compiler.jvmci.common.testcases.SingleImplementer;
  49 import compiler.jvmci.common.testcases.SingleImplementerInterface;
  50 import compiler.jvmci.common.testcases.SingleSubclass;
  51 import compiler.jvmci.common.testcases.SingleSubclassedClass;
  52 import compiler.jvmci.common.CTVMUtilities;
  53 import compiler.jvmci.common.testcases.AnotherSingleImplementer;
  54 import compiler.jvmci.common.testcases.AnotherSingleImplementerInterface;



  55 import java.lang.reflect.Method;
  56 import java.util.HashSet;
  57 import java.util.Set;
  58 import java.util.stream.Stream;
  59 import jdk.vm.ci.hotspot.CompilerToVMHelper;
  60 import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
  61 import jdk.vm.ci.hotspot.HotSpotResolvedObjectType;
  62 import jdk.test.lib.Asserts;
  63 import jdk.test.lib.Utils;
  64 
  65 public class GetVtableIndexForInterfaceTest {
  66     private static final int INVALID_VTABLE_INDEX = -4; // see method.hpp: VtableIndexFlag
  67 
  68     public static void main(String args[]) {
  69         GetVtableIndexForInterfaceTest test
  70                 = new GetVtableIndexForInterfaceTest();
  71         try {
  72             for (TestCase tcase : createTestCases()) {
  73                 test.runTest(tcase);
  74             }
  75         } catch (NoSuchMethodException e) {
  76             throw new Error("TEST BUG: can't find requested method", e);
  77         }
  78     }
  79 
  80     private static Set<TestCase> createTestCases() {
  81         Set<TestCase> result = new HashSet<>();
  82         Stream.of(
  83                     AbstractClass.class,




  23 
  24 /*
  25  * @test
  26  * @bug 8136421
  27  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  28  * @library / /testlibrary /test/lib
  29  * @library ../common/patches
  30  * @modules java.base/jdk.internal.misc
  31  * @modules java.base/jdk.internal.org.objectweb.asm
  32  *          java.base/jdk.internal.org.objectweb.asm.tree
  33  *          jdk.vm.ci/jdk.vm.ci.hotspot
  34  *          jdk.vm.ci/jdk.vm.ci.code
  35  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
  36  * @build compiler.jvmci.compilerToVM.GetVtableIndexForInterfaceTest
  37  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  38  *                   compiler.jvmci.compilerToVM.GetVtableIndexForInterfaceTest
  39  */
  40 
  41 package compiler.jvmci.compilerToVM;
  42 
  43 import compiler.jvmci.common.CTVMUtilities;
  44 import compiler.jvmci.common.testcases.AbstractClass;
  45 import compiler.jvmci.common.testcases.AnotherSingleImplementer;
  46 import compiler.jvmci.common.testcases.AnotherSingleImplementerInterface;
  47 import compiler.jvmci.common.testcases.DoNotExtendClass;
  48 import compiler.jvmci.common.testcases.MultipleAbstractImplementer;
  49 import compiler.jvmci.common.testcases.MultipleImplementersInterface;
  50 import compiler.jvmci.common.testcases.MultipleImplementersInterfaceExtender;
  51 import compiler.jvmci.common.testcases.SingleImplementer;
  52 import compiler.jvmci.common.testcases.SingleImplementerInterface;
  53 import compiler.jvmci.common.testcases.SingleSubclass;
  54 import compiler.jvmci.common.testcases.SingleSubclassedClass;
  55 import jdk.test.lib.Asserts;
  56 import jdk.test.lib.Utils;
  57 import jdk.vm.ci.hotspot.CompilerToVMHelper;
  58 import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
  59 import jdk.vm.ci.hotspot.HotSpotResolvedObjectType;
  60 
  61 import java.lang.reflect.Method;
  62 import java.util.HashSet;
  63 import java.util.Set;
  64 import java.util.stream.Stream;





  65 
  66 public class GetVtableIndexForInterfaceTest {
  67     private static final int INVALID_VTABLE_INDEX = -4; // see method.hpp: VtableIndexFlag
  68 
  69     public static void main(String args[]) {
  70         GetVtableIndexForInterfaceTest test
  71                 = new GetVtableIndexForInterfaceTest();
  72         try {
  73             for (TestCase tcase : createTestCases()) {
  74                 test.runTest(tcase);
  75             }
  76         } catch (NoSuchMethodException e) {
  77             throw new Error("TEST BUG: can't find requested method", e);
  78         }
  79     }
  80 
  81     private static Set<TestCase> createTestCases() {
  82         Set<TestCase> result = new HashSet<>();
  83         Stream.of(
  84                     AbstractClass.class,


< prev index next >