comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/micro/VarArgs_boolean01.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 64dcb92ee75a
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.micro; 23 package com.oracle.graal.jtt.micro;
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 VarArgs_boolean01 { 30 public class VarArgs_boolean01 extends JTTTest {
30 31
31 public static boolean test(int arg) { 32 public static boolean test(int arg) {
32 if (arg == 4) { 33 if (arg == 4) {
33 return get(0); 34 return get(0);
34 } 35 }
39 return args[index]; 40 return args[index];
40 } 41 }
41 42
42 @Test 43 @Test
43 public void run0() throws Throwable { 44 public void run0() throws Throwable {
44 Assert.assertEquals(true, test(0)); 45 runTest("test", 0);
45 } 46 }
46 47
47 @Test 48 @Test
48 public void run1() throws Throwable { 49 public void run1() throws Throwable {
49 Assert.assertEquals(false, test(1)); 50 runTest("test", 1);
50 } 51 }
51 52
52 @Test 53 @Test
53 public void run2() throws Throwable { 54 public void run2() throws Throwable {
54 Assert.assertEquals(true, test(2)); 55 runTest("test", 2);
55 } 56 }
56 57
57 @Test(expected = java.lang.ArrayIndexOutOfBoundsException.class) 58 @Test
58 public void run3() throws Throwable { 59 public void run3() throws Throwable {
59 test(3); 60 runTest("test", 3);
60 } 61 }
61 62
62 @Test(expected = java.lang.ArrayIndexOutOfBoundsException.class) 63 @Test
63 public void run4() throws Throwable { 64 public void run4() throws Throwable {
64 test(4); 65 runTest("test", 4);
65 } 66 }
66 67
67 } 68 }