comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/optimize/BC_imul_16.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 */ 29 */
29 public class BC_imul_16 { 30 public class BC_imul_16 extends JTTTest {
30 31
31 public static int test(int i, int arg) { 32 public static int test(int i, int arg) {
32 if (i == 0) { 33 if (i == 0) {
33 final int mult = 16; 34 final int mult = 16;
34 return arg * mult; 35 return arg * mult;
36 return arg * 16; 37 return arg * 16;
37 } 38 }
38 39
39 @Test 40 @Test
40 public void run0() throws Throwable { 41 public void run0() throws Throwable {
41 Assert.assertEquals(0, test(0, 0)); 42 runTest("test", 0, 0);
42 } 43 }
43 44
44 @Test 45 @Test
45 public void run1() throws Throwable { 46 public void run1() throws Throwable {
46 Assert.assertEquals(256, test(0, 16)); 47 runTest("test", 0, 16);
47 } 48 }
48 49
49 @Test 50 @Test
50 public void run2() throws Throwable { 51 public void run2() throws Throwable {
51 Assert.assertEquals(272, test(0, 17)); 52 runTest("test", 0, 17);
52 } 53 }
53 54
54 @Test 55 @Test
55 public void run3() throws Throwable { 56 public void run3() throws Throwable {
56 Assert.assertEquals(-16, test(0, -1)); 57 runTest("test", 0, -1);
57 } 58 }
58 59
59 @Test 60 @Test
60 public void run4() throws Throwable { 61 public void run4() throws Throwable {
61 Assert.assertEquals(-256, test(0, -16)); 62 runTest("test", 0, -16);
62 } 63 }
63 64
64 @Test 65 @Test
65 public void run5() throws Throwable { 66 public void run5() throws Throwable {
66 Assert.assertEquals(-272, test(0, -17)); 67 runTest("test", 0, -17);
67 } 68 }
68 69
69 @Test 70 @Test
70 public void run6() throws Throwable { 71 public void run6() throws Throwable {
71 Assert.assertEquals(-16, test(0, 2147483647)); 72 runTest("test", 0, 2147483647);
72 } 73 }
73 74
74 @Test 75 @Test
75 public void run7() throws Throwable { 76 public void run7() throws Throwable {
76 Assert.assertEquals(0, test(0, -2147483648)); 77 runTest("test", 0, -2147483648);
77 } 78 }
78 79
79 @Test 80 @Test
80 public void run8() throws Throwable { 81 public void run8() throws Throwable {
81 Assert.assertEquals(0, test(1, 0)); 82 runTest("test", 1, 0);
82 } 83 }
83 84
84 @Test 85 @Test
85 public void run9() throws Throwable { 86 public void run9() throws Throwable {
86 Assert.assertEquals(256, test(1, 16)); 87 runTest("test", 1, 16);
87 } 88 }
88 89
89 @Test 90 @Test
90 public void run10() throws Throwable { 91 public void run10() throws Throwable {
91 Assert.assertEquals(272, test(1, 17)); 92 runTest("test", 1, 17);
92 } 93 }
93 94
94 @Test 95 @Test
95 public void run11() throws Throwable { 96 public void run11() throws Throwable {
96 Assert.assertEquals(-16, test(1, -1)); 97 runTest("test", 1, -1);
97 } 98 }
98 99
99 @Test 100 @Test
100 public void run12() throws Throwable { 101 public void run12() throws Throwable {
101 Assert.assertEquals(-256, test(1, -16)); 102 runTest("test", 1, -16);
102 } 103 }
103 104
104 @Test 105 @Test
105 public void run13() throws Throwable { 106 public void run13() throws Throwable {
106 Assert.assertEquals(-272, test(1, -17)); 107 runTest("test", 1, -17);
107 } 108 }
108 109
109 @Test 110 @Test
110 public void run14() throws Throwable { 111 public void run14() throws Throwable {
111 Assert.assertEquals(-16, test(1, 2147483647)); 112 runTest("test", 1, 2147483647);
112 } 113 }
113 114
114 @Test 115 @Test
115 public void run15() throws Throwable { 116 public void run15() throws Throwable {
116 Assert.assertEquals(0, test(1, -2147483648)); 117 runTest("test", 1, -2147483648);
117 } 118 }
118 119
119 } 120 }