< prev index next >

test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java

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


  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 jdk.vm.ci/jdk.vm.ci.hotspot
  32  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
  33  * @build compiler.jvmci.compilerToVM.HasFinalizableSubclassTest
  34  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  35  *                  compiler.jvmci.compilerToVM.HasFinalizableSubclassTest
  36  */
  37 
  38 package compiler.jvmci.compilerToVM;
  39 
  40 import compiler.jvmci.common.testcases.AbstractClass;
  41 import compiler.jvmci.common.testcases.AbstractClassExtender;
  42 import compiler.jvmci.common.testcases.DoNotImplementInterface;
  43 import compiler.jvmci.common.testcases.MultipleImplementer1;
  44 import compiler.jvmci.common.testcases.MultipleImplementersInterface;
  45 import compiler.jvmci.common.testcases.SingleImplementerInterface;





  46 import java.util.HashSet;
  47 import java.util.Set;
  48 import java.util.stream.Stream;
  49 import jdk.vm.ci.hotspot.CompilerToVMHelper;
  50 import jdk.vm.ci.hotspot.HotSpotResolvedObjectType;
  51 import jdk.test.lib.Asserts;
  52 import jdk.test.lib.Utils;
  53 
  54 public class HasFinalizableSubclassTest {
  55     public static void main(String args[]) {
  56         HasFinalizableSubclassTest test = new HasFinalizableSubclassTest();
  57         for (TestCase tcase : createTestCases()) {
  58             test.runTest(tcase);
  59         }
  60     }
  61 
  62     private static Set<TestCase> createTestCases() {
  63         Stream.of(
  64                     AbstractClassExtender.class,
  65                     SingleImplementerInterface.class,
  66                     MultipleImplementersInterface.class,
  67                     MultipleImplementer1.class,
  68                     DoNotImplementInterface.class)
  69                 .forEach(Utils::ensureClassIsLoaded);
  70         Set<TestCase> result = new HashSet<>();
  71         // iface with finalize method
  72         result.add(new TestCase(SingleImplementerInterface.class, false));




  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 jdk.vm.ci/jdk.vm.ci.hotspot
  32  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
  33  * @build compiler.jvmci.compilerToVM.HasFinalizableSubclassTest
  34  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  35  *                  compiler.jvmci.compilerToVM.HasFinalizableSubclassTest
  36  */
  37 
  38 package compiler.jvmci.compilerToVM;
  39 
  40 import compiler.jvmci.common.testcases.AbstractClass;
  41 import compiler.jvmci.common.testcases.AbstractClassExtender;
  42 import compiler.jvmci.common.testcases.DoNotImplementInterface;
  43 import compiler.jvmci.common.testcases.MultipleImplementer1;
  44 import compiler.jvmci.common.testcases.MultipleImplementersInterface;
  45 import compiler.jvmci.common.testcases.SingleImplementerInterface;
  46 import jdk.test.lib.Asserts;
  47 import jdk.test.lib.Utils;
  48 import jdk.vm.ci.hotspot.CompilerToVMHelper;
  49 import jdk.vm.ci.hotspot.HotSpotResolvedObjectType;
  50 
  51 import java.util.HashSet;
  52 import java.util.Set;
  53 import java.util.stream.Stream;




  54 
  55 public class HasFinalizableSubclassTest {
  56     public static void main(String args[]) {
  57         HasFinalizableSubclassTest test = new HasFinalizableSubclassTest();
  58         for (TestCase tcase : createTestCases()) {
  59             test.runTest(tcase);
  60         }
  61     }
  62 
  63     private static Set<TestCase> createTestCases() {
  64         Stream.of(
  65                     AbstractClassExtender.class,
  66                     SingleImplementerInterface.class,
  67                     MultipleImplementersInterface.class,
  68                     MultipleImplementer1.class,
  69                     DoNotImplementInterface.class)
  70                 .forEach(Utils::ensureClassIsLoaded);
  71         Set<TestCase> result = new HashSet<>();
  72         // iface with finalize method
  73         result.add(new TestCase(SingleImplementerInterface.class, false));


< prev index next >