Mercurial > hg > truffle
comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/bytecode/BC_ladd2.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 |
---|---|
23 /* | 23 /* |
24 * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. | 24 * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. |
25 */ | 25 */ |
26 package com.oracle.graal.jtt.bytecode; | 26 package com.oracle.graal.jtt.bytecode; |
27 | 27 |
28 import com.oracle.graal.jtt.*; | |
28 import org.junit.*; | 29 import org.junit.*; |
29 | 30 |
30 /* | 31 /* |
31 */ | 32 */ |
32 public class BC_ladd2 { | 33 public class BC_ladd2 extends JTTTest { |
33 | 34 |
34 public static long test(int a, int b) { | 35 public static long test(int a, int b) { |
35 return a + (long) b; | 36 return a + (long) b; |
36 } | 37 } |
37 | 38 |
38 @Test | 39 @Test |
39 public void run0() throws Throwable { | 40 public void run0() throws Throwable { |
40 Assert.assertEquals(3L, test(1, 2)); | 41 runTest("test", 1, 2); |
41 } | 42 } |
42 | 43 |
43 @Test | 44 @Test |
44 public void run1() throws Throwable { | 45 public void run1() throws Throwable { |
45 Assert.assertEquals(-1L, test(0, -1)); | 46 runTest("test", 0, -1); |
46 } | 47 } |
47 | 48 |
48 @Test | 49 @Test |
49 public void run2() throws Throwable { | 50 public void run2() throws Throwable { |
50 Assert.assertEquals(100L, test(33, 67)); | 51 runTest("test", 33, 67); |
51 } | 52 } |
52 | 53 |
53 @Test | 54 @Test |
54 public void run3() throws Throwable { | 55 public void run3() throws Throwable { |
55 Assert.assertEquals(0L, test(1, -1)); | 56 runTest("test", 1, -1); |
56 } | 57 } |
57 | 58 |
58 @Test | 59 @Test |
59 public void run4() throws Throwable { | 60 public void run4() throws Throwable { |
60 Assert.assertEquals(-2147483647L, test(-2147483648, 1)); | 61 runTest("test", -2147483648, 1); |
61 } | 62 } |
62 | 63 |
63 @Test | 64 @Test |
64 public void run5() throws Throwable { | 65 public void run5() throws Throwable { |
65 Assert.assertEquals(2147483648L, test(2147483647, 1)); | 66 runTest("test", 2147483647, 1); |
66 } | 67 } |
67 | 68 |
68 @Test | 69 @Test |
69 public void run6() throws Throwable { | 70 public void run6() throws Throwable { |
70 Assert.assertEquals(-2147483649L, test(-2147483647, -2)); | 71 runTest("test", -2147483647, -2); |
71 } | 72 } |
72 | 73 |
73 } | 74 } |