Mercurial > hg > truffle
changeset 13581:37b14ac9c5fb
Simplify UnsafeAllocateInstance01 tests and ignore tests that crash hotspot
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Thu, 09 Jan 2014 15:11:34 +0100 |
parents | 8958eb3ff6b9 |
children | be5006687c43 |
files | graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/jdk/UnsafeAllocateInstance01.java |
diffstat | 1 files changed, 15 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- 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); } }