comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/reflect/Method_getReturnType01.java @ 7282:390448a6b535

converted the JTT tests to use the GraalCompilerTest framework which offers more control over what is compiled and executed the HP_series and FloatingReads tests have been disabled temporarily
author Doug Simon <doug.simon@oracle.com>
date Thu, 20 Dec 2012 14:59:57 +0100
parents e808627bd16f
children c38d2870439e
comparison
equal deleted inserted replaced
7281:e960cda050d7 7282:390448a6b535
20 * or visit www.oracle.com if you need additional information or have any 20 * or visit www.oracle.com if you need additional information or have any
21 * questions. 21 * questions.
22 */ 22 */
23 package com.oracle.graal.jtt.reflect; 23 package com.oracle.graal.jtt.reflect;
24 24
25 import com.oracle.graal.jtt.*;
25 import org.junit.*; 26 import org.junit.*;
26 27
27 /* 28 /*
28 */ 29 */
29 public class Method_getReturnType01 { 30 public class Method_getReturnType01 extends JTTTest {
30 31
31 public static String test(int arg) throws NoSuchMethodException { 32 public static String test(int arg) throws NoSuchMethodException {
32 if (arg == 0) { 33 if (arg == 0) {
33 return Method_getReturnType01.class.getMethod("method1").getReturnType().getName(); 34 return Method_getReturnType01.class.getMethod("method1").getReturnType().getName();
34 } else if (arg == 1) { 35 } else if (arg == 1) {
50 public void method3() { 51 public void method3() {
51 } 52 }
52 53
53 @Test 54 @Test
54 public void run0() throws Throwable { 55 public void run0() throws Throwable {
55 Assert.assertEquals("int", test(0)); 56 runTest("test", 0);
56 } 57 }
57 58
58 @Test 59 @Test
59 public void run1() throws Throwable { 60 public void run1() throws Throwable {
60 Assert.assertEquals("java.lang.String", test(1)); 61 runTest("test", 1);
61 } 62 }
62 63
63 @Test 64 @Test
64 public void run2() throws Throwable { 65 public void run2() throws Throwable {
65 Assert.assertEquals("void", test(2)); 66 runTest("test", 2);
66 } 67 }
67 68
68 @Test 69 @Test
69 public void run3() throws Throwable { 70 public void run3() throws Throwable {
70 Assert.assertEquals(null, test(3)); 71 runTest("test", 3);
71 } 72 }
72 73
73 } 74 }