< prev index next >

test/runtime/valhalla/valuetypes/DeriveValueTypeCreation.java

Print this page




  27 import java.lang.reflect.Field;
  28 import java.lang.reflect.Method;
  29 import static java.lang.reflect.Modifier.*;
  30 import java.net.URL;
  31 import java.util.Enumeration;
  32 
  33 import jdk.experimental.value.ValueType;
  34 
  35 import jdk.internal.org.objectweb.asm.*;
  36 import static jdk.internal.org.objectweb.asm.Opcodes.*;
  37 
  38 import static jdk.test.lib.Asserts.*;
  39 
  40 /*
  41  * @test DeriveValueTypeCreation
  42  * @summary Derive Value Type creation test
  43  * @library /test/lib
  44  * @modules java.base/jdk.internal.org.objectweb.asm
  45  * @build runtime.valhalla.valuetypes.ValueCapableClass
  46  * @run main/othervm -Xint -noverify -XX:+EnableMVT runtime.valhalla.valuetypes.DeriveValueTypeCreation
  47  * @run main/othervm -Xcomp -noverify -XX:+EnableMVT
  48  *                   -XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_isAssignableFrom
  49  *                   runtime.valhalla.valuetypes.DeriveValueTypeCreation
  50  */
  51 public class DeriveValueTypeCreation {
  52 
  53     public static final String VCC_CLASSNAME = "runtime.valhalla.valuetypes.ValueCapableClass";
  54 
  55     public static void main(String[] args) {
  56         DeriveValueTypeCreation test = new DeriveValueTypeCreation();
  57         test.run();
  58     }
  59 
  60     public void run() {
  61         loadAndRunTest();
  62         notValueCapableClasses();
  63     }
  64 
  65     void loadAndRunTest() {
  66         Class<?> clazz = null;
  67         try {
  68             clazz = Class.forName(VCC_CLASSNAME, true, getClass().getClassLoader());
  69             clazz.getDeclaredMethod("test").invoke(null);




  27 import java.lang.reflect.Field;
  28 import java.lang.reflect.Method;
  29 import static java.lang.reflect.Modifier.*;
  30 import java.net.URL;
  31 import java.util.Enumeration;
  32 
  33 import jdk.experimental.value.ValueType;
  34 
  35 import jdk.internal.org.objectweb.asm.*;
  36 import static jdk.internal.org.objectweb.asm.Opcodes.*;
  37 
  38 import static jdk.test.lib.Asserts.*;
  39 
  40 /*
  41  * @test DeriveValueTypeCreation
  42  * @summary Derive Value Type creation test
  43  * @library /test/lib
  44  * @modules java.base/jdk.internal.org.objectweb.asm
  45  * @build runtime.valhalla.valuetypes.ValueCapableClass
  46  * @run main/othervm -Xint -noverify -XX:+EnableMVT runtime.valhalla.valuetypes.DeriveValueTypeCreation
  47  * @run main/othervm -Xcomp -noverify -XX:+EnableMVT runtime.valhalla.valuetypes.DeriveValueTypeCreation


  48  */
  49 public class DeriveValueTypeCreation {
  50 
  51     public static final String VCC_CLASSNAME = "runtime.valhalla.valuetypes.ValueCapableClass";
  52 
  53     public static void main(String[] args) {
  54         DeriveValueTypeCreation test = new DeriveValueTypeCreation();
  55         test.run();
  56     }
  57 
  58     public void run() {
  59         loadAndRunTest();
  60         notValueCapableClasses();
  61     }
  62 
  63     void loadAndRunTest() {
  64         Class<?> clazz = null;
  65         try {
  66             clazz = Class.forName(VCC_CLASSNAME, true, getClass().getClassLoader());
  67             clazz.getDeclaredMethod("test").invoke(null);


< prev index next >