< prev index next >

test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java

Print this page

        

*** 42,53 **** package compiler.jvmci.compilerToVM; import java.util.HashMap; import java.util.Map; import jdk.vm.ci.hotspot.CompilerToVMHelper; ! import jdk.vm.ci.hotspot.HotSpotConstantPool; ! import jdk.vm.ci.hotspot.HotSpotResolvedObjectTypeImpl; import sun.reflect.ConstantPool; /** * Test for {@code compiler.jvmci.CompilerToVM.lookupKlassInPool} method */ --- 42,52 ---- package compiler.jvmci.compilerToVM; import java.util.HashMap; import java.util.Map; import jdk.vm.ci.hotspot.CompilerToVMHelper; ! import jdk.vm.ci.hotspot.HotSpotResolvedObjectType; import sun.reflect.ConstantPool; /** * Test for {@code compiler.jvmci.CompilerToVM.lookupKlassInPool} method */
*** 60,79 **** LookupKlassInPoolTest::validate); ConstantPoolTestCase testCase = new ConstantPoolTestCase(typeTests); testCase.test(); } ! public static void validate(HotSpotConstantPool constantPoolCTVM, ConstantPool constantPoolSS, ConstantPoolTestsHelper.DummyClasses dummyClass, int i) { Object classToVerify = CompilerToVMHelper .lookupKlassInPool(constantPoolCTVM, i); ! if (!(classToVerify instanceof HotSpotResolvedObjectTypeImpl) && !(classToVerify instanceof String)) { String msg = String.format("Output of method" + " CTVM.lookupKlassInPool is neither" ! + " a HotSpotResolvedObjectTypeImpl, nor a String"); throw new AssertionError(msg); } int classNameIndex = (int) dummyClass.cp.get(i).value; String classNameToRefer = constantPoolSS.getUTF8At(classNameIndex); --- 59,78 ---- LookupKlassInPoolTest::validate); ConstantPoolTestCase testCase = new ConstantPoolTestCase(typeTests); testCase.test(); } ! public static void validate(jdk.vm.ci.meta.ConstantPool constantPoolCTVM, ConstantPool constantPoolSS, ConstantPoolTestsHelper.DummyClasses dummyClass, int i) { Object classToVerify = CompilerToVMHelper .lookupKlassInPool(constantPoolCTVM, i); ! if (!(classToVerify instanceof HotSpotResolvedObjectType) && !(classToVerify instanceof String)) { String msg = String.format("Output of method" + " CTVM.lookupKlassInPool is neither" ! + " a HotSpotResolvedObjectType, nor a String"); throw new AssertionError(msg); } int classNameIndex = (int) dummyClass.cp.get(i).value; String classNameToRefer = constantPoolSS.getUTF8At(classNameIndex);
< prev index next >