# HG changeset patch # User Gilles Duboscq # Date 1389276694 -3600 # Node ID 37b14ac9c5fb63a4c2f8b889d68a456f7ed9a6c4 # Parent 8958eb3ff6b98997d1527f8d36e7849700b22a9a Simplify UnsafeAllocateInstance01 tests and ignore tests that crash hotspot diff -r 8958eb3ff6b9 -r 37b14ac9c5fb graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/jdk/UnsafeAllocateInstance01.java --- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/jdk/UnsafeAllocateInstance01.java Thu Jan 09 11:29:18 2014 +0100 +++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/jdk/UnsafeAllocateInstance01.java Thu Jan 09 15:11:34 2014 +0100 @@ -47,34 +47,9 @@ return newObject.field01; } - public static void testArray() throws SecurityException, InstantiationException { - final Unsafe unsafe = getUnsafe(); - unsafe.allocateInstance(UnsafeAllocateInstance01[].class); - } - - public static void testAbstract() throws SecurityException, InstantiationException { - final Unsafe unsafe = getUnsafe(); - unsafe.allocateInstance(AbstractClass.class); - } - - public static void testInterface() throws SecurityException, InstantiationException { + public static void testClassForException(Class clazz) throws SecurityException, InstantiationException { final Unsafe unsafe = getUnsafe(); - unsafe.allocateInstance(List.class); - } - - public static void testClass() throws SecurityException, InstantiationException { - final Unsafe unsafe = getUnsafe(); - unsafe.allocateInstance(Class.class); - } - - public static void testVoid() throws SecurityException, InstantiationException { - final Unsafe unsafe = getUnsafe(); - unsafe.allocateInstance(void.class); - } - - public static void testInt() throws SecurityException, InstantiationException { - final Unsafe unsafe = getUnsafe(); - unsafe.allocateInstance(int.class); + unsafe.allocateInstance(clazz); } static Unsafe getUnsafe() { @@ -94,31 +69,38 @@ @Test public void run1() throws Throwable { - runTest("testArray"); + runTest("testClassForException", UnsafeAllocateInstance01[].class); + } + + @Test + public void run7() throws Throwable { + runTest("testClassForException", UnsafeAllocateInstance01.class); } @Test public void run2() throws Throwable { - runTest("testAbstract"); + runTest("testClassForException", AbstractClass.class); } @Test public void run3() throws Throwable { - runTest("testInterface"); + runTest("testClassForException", List.class); } @Test public void run4() throws Throwable { - runTest("testClass"); + runTest("testClassForException", Class.class); } + @Ignore("Currently crashes hotspot") @Test public void run5() throws Throwable { - runTest("testVoid"); + runTest("testClassForException", void.class); } + @Ignore("Currently crashes hotspot") @Test public void run6() throws Throwable { - runTest("testInt"); + runTest("testClassForException", int.class); } }