Mercurial > hg > truffle
comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/Reduce_Convert01.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 Reduce_Convert01 { | 31 public class Reduce_Convert01 extends JTTTest { |
31 | 32 |
32 public static int test(int arg) { | 33 public static int test(int arg) { |
33 if (arg == 0) { | 34 if (arg == 0) { |
34 return i2b(arg + 10); | 35 return i2b(arg + 10); |
35 } | 36 } |
57 return (char) x; | 58 return (char) x; |
58 } | 59 } |
59 | 60 |
60 @Test | 61 @Test |
61 public void run0() throws Throwable { | 62 public void run0() throws Throwable { |
62 Assert.assertEquals(10, test(0)); | 63 runTest("test", 0); |
63 } | 64 } |
64 | 65 |
65 @Test | 66 @Test |
66 public void run1() throws Throwable { | 67 public void run1() throws Throwable { |
67 Assert.assertEquals(11, test(1)); | 68 runTest("test", 1); |
68 } | 69 } |
69 | 70 |
70 @Test | 71 @Test |
71 public void run2() throws Throwable { | 72 public void run2() throws Throwable { |
72 Assert.assertEquals(12, test(2)); | 73 runTest("test", 2); |
73 } | 74 } |
74 | 75 |
75 } | 76 } |