comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/Reduce_LongShift02.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 of integer operations. 29 * Tests optimization of integer operations.
29 */ 30 */
30 public class Reduce_LongShift02 { 31 public class Reduce_LongShift02 extends JTTTest {
31 32
32 public static long test(long arg) { 33 public static long test(long arg) {
33 if (arg == 0) { 34 if (arg == 0) {
34 return shift0(arg + 80); 35 return shift0(arg + 80);
35 } 36 }
68 return x << 3 << 1; 69 return x << 3 << 1;
69 } 70 }
70 71
71 @Test 72 @Test
72 public void run0() throws Throwable { 73 public void run0() throws Throwable {
73 Assert.assertEquals(80L, test(0)); 74 runTest("test", 0L);
74 } 75 }
75 76
76 @Test 77 @Test
77 public void run1() throws Throwable { 78 public void run1() throws Throwable {
78 Assert.assertEquals(11L, test(1)); 79 runTest("test", 1L);
79 } 80 }
80 81
81 @Test 82 @Test
82 public void run2() throws Throwable { 83 public void run2() throws Throwable {
83 Assert.assertEquals(12L, test(2)); 84 runTest("test", 2L);
84 } 85 }
85 86
86 @Test 87 @Test
87 public void run3() throws Throwable { 88 public void run3() throws Throwable {
88 Assert.assertEquals(13L, test(3)); 89 runTest("test", 3L);
89 } 90 }
90 91
91 @Test 92 @Test
92 public void run4() throws Throwable { 93 public void run4() throws Throwable {
93 Assert.assertEquals(64L, test(4)); 94 runTest("test", 4L);
94 } 95 }
95 96
96 } 97 }