Mercurial > hg > truffle
comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/bytecode/BC_lmul.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.bytecode; | 23 package com.oracle.graal.jtt.bytecode; |
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_lmul { | 30 public class BC_lmul extends JTTTest { |
30 | 31 |
31 public static long test(long a, long b) { | 32 public static long test(long a, long b) { |
32 return a * b; | 33 return a * b; |
33 } | 34 } |
34 | 35 |
35 @Test | 36 @Test |
36 public void run0() throws Throwable { | 37 public void run0() throws Throwable { |
37 Assert.assertEquals(2L, test(1L, 2L)); | 38 runTest("test", 1L, 2L); |
38 } | 39 } |
39 | 40 |
40 @Test | 41 @Test |
41 public void run1() throws Throwable { | 42 public void run1() throws Throwable { |
42 Assert.assertEquals(0L, test(0L, -1L)); | 43 runTest("test", 0L, -1L); |
43 } | 44 } |
44 | 45 |
45 @Test | 46 @Test |
46 public void run2() throws Throwable { | 47 public void run2() throws Throwable { |
47 Assert.assertEquals(2211L, test(33L, 67L)); | 48 runTest("test", 33L, 67L); |
48 } | 49 } |
49 | 50 |
50 @Test | 51 @Test |
51 public void run3() throws Throwable { | 52 public void run3() throws Throwable { |
52 Assert.assertEquals(-1L, test(1L, -1L)); | 53 runTest("test", 1L, -1L); |
53 } | 54 } |
54 | 55 |
55 @Test | 56 @Test |
56 public void run4() throws Throwable { | 57 public void run4() throws Throwable { |
57 Assert.assertEquals(-2147483648L, test(-2147483648L, 1L)); | 58 runTest("test", -2147483648L, 1L); |
58 } | 59 } |
59 | 60 |
60 @Test | 61 @Test |
61 public void run5() throws Throwable { | 62 public void run5() throws Throwable { |
62 Assert.assertEquals(-2147483647L, test(2147483647L, -1L)); | 63 runTest("test", 2147483647L, -1L); |
63 } | 64 } |
64 | 65 |
65 @Test | 66 @Test |
66 public void run6() throws Throwable { | 67 public void run6() throws Throwable { |
67 Assert.assertEquals(2147483648L, test(-2147483648L, -1L)); | 68 runTest("test", -2147483648L, -1L); |
68 } | 69 } |
69 | 70 |
70 @Test | 71 @Test |
71 public void run7() throws Throwable { | 72 public void run7() throws Throwable { |
72 Assert.assertEquals(1000000000000L, test(1000000L, 1000000L)); | 73 runTest("test", 1000000L, 1000000L); |
73 } | 74 } |
74 | 75 |
75 } | 76 } |