Mercurial > hg > truffle
comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/VN_Convert02.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.optimize; | 23 package com.oracle.graal.jtt.optimize; |
24 | 24 |
25 import com.oracle.graal.jtt.*; | |
25 import org.junit.*; | 26 import org.junit.*; |
26 | 27 |
27 /* | 28 /* |
28 * Tests optimization integer conversions. | 29 * Tests optimization integer conversions. |
29 */ | 30 */ |
30 public class VN_Convert02 { | 31 public class VN_Convert02 extends JTTTest { |
31 | 32 |
32 private static boolean cond = true; | 33 private static boolean cond = true; |
33 | 34 |
34 public static int test(int arg) { | 35 public static int test(int arg) { |
35 if (arg == 0) { | 36 if (arg == 0) { |
71 return 0; | 72 return 0; |
72 } | 73 } |
73 | 74 |
74 @Test | 75 @Test |
75 public void run0() throws Throwable { | 76 public void run0() throws Throwable { |
76 Assert.assertEquals(20, test(0)); | 77 runTest("test", 0); |
77 } | 78 } |
78 | 79 |
79 @Test | 80 @Test |
80 public void run1() throws Throwable { | 81 public void run1() throws Throwable { |
81 Assert.assertEquals(22, test(1)); | 82 runTest("test", 1); |
82 } | 83 } |
83 | 84 |
84 @Test | 85 @Test |
85 public void run2() throws Throwable { | 86 public void run2() throws Throwable { |
86 Assert.assertEquals(24, test(2)); | 87 runTest("test", 2); |
87 } | 88 } |
88 | 89 |
89 } | 90 } |