changeset 26112:54982b5983d4

8138746: [TESTBUG] compiler/jvmci/compilerToVM/GetConstantPoolTest should be updated according to 8137159 fix
author twisti
date Thu, 08 Oct 2015 07:05:04 -1000
parents b7f322a77420
children 3fbf4befb3a0
files test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java
diffstat 1 files changed, 19 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java	Thu Oct 08 07:04:27 2015 -1000
+++ b/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java	Thu Oct 08 07:05:04 2015 -1000
@@ -33,7 +33,7 @@
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  *                              jdk.vm.ci.hotspot.CompilerToVMHelper
- * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions 
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
  *                   -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions
  *                   -XX:+EnableJVMCI compiler.jvmci.compilerToVM.GetConstantPoolTest
  */
@@ -143,18 +143,6 @@
                         getPtrToCpAddress() - ptrToClass);
             }
         },
-        METASPACE_WRAPPER_BASE {
-            @Override
-            HotSpotConstantPool getConstantPool() {
-                return CompilerToVMHelper.getConstantPool(
-                        new MetaspaceWrapperObject() {
-                            @Override
-                            public long getMetaspacePointer() {
-                                return getPtrToCpAddress();
-                            }
-                        }, 0L);
-            }
-        },
         ;
         abstract HotSpotConstantPool getConstantPool();
     }
@@ -187,13 +175,29 @@
             test.test(testCase);
         }
         testObjectBase();
+        testMetaspaceWrapperBase();
     }
 
     private static void testObjectBase() {
         try {
             HotSpotConstantPool cp
-                    = CompilerToVMHelper.getConstantPool(new Object(), 0);
-            throw new AssertionError("Test TEST_OBJECT_BASE."
+                    = CompilerToVMHelper.getConstantPool(new Object(), 0L);
+            throw new AssertionError("Test OBJECT_BASE."
+                + " Expected IllegalArgumentException has not been caught");
+        } catch (IllegalArgumentException iae) {
+            // expected
+        }
+    }
+    private static void testMetaspaceWrapperBase() {
+        try {
+            HotSpotConstantPool cp = CompilerToVMHelper.getConstantPool(
+                    new MetaspaceWrapperObject() {
+                        @Override
+                        public long getMetaspacePointer() {
+                            return getPtrToCpAddress();
+                        }
+                    }, 0L);
+            throw new AssertionError("Test METASPACE_WRAPPER_BASE."
                 + " Expected IllegalArgumentException has not been caught");
         } catch (IllegalArgumentException iae) {
             // expected