Mercurial > hg > truffle
comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotpath/HP_scope02.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 | 5e3d1a68664e |
comparison
equal
deleted
inserted
replaced
7281:e960cda050d7 | 7282:390448a6b535 |
---|---|
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 // Checkstyle: stop | 23 // Checkstyle: stop |
24 package com.oracle.graal.jtt.hotpath; | 24 package com.oracle.graal.jtt.hotpath; |
25 | 25 |
26 import com.oracle.graal.jtt.*; | |
26 import org.junit.*; | 27 import org.junit.*; |
27 | 28 |
28 /* | 29 /* |
29 */ | 30 */ |
30 public class HP_scope02 { | 31 public class HP_scope02 extends JTTTest { |
31 | 32 |
32 public static int test(int count) { | 33 public static int test(int count) { |
33 int sum = 0; | 34 int sum = 0; |
34 // Although sum is not explicitly read in the tree below it is implicitly read | 35 // Although sum is not explicitly read in the tree below it is implicitly read |
35 // by the guard bail-out. | 36 // by the guard bail-out. |
42 return sum; | 43 return sum; |
43 } | 44 } |
44 | 45 |
45 @Test | 46 @Test |
46 public void run0() throws Throwable { | 47 public void run0() throws Throwable { |
47 Assert.assertEquals(20, test(40)); | 48 runTest("test", 40); |
48 } | 49 } |
49 | 50 |
50 @Test | 51 @Test |
51 public void run1() throws Throwable { | 52 public void run1() throws Throwable { |
52 Assert.assertEquals(20, test(22)); | 53 runTest("test", 22); |
53 } | 54 } |
54 | 55 |
55 } | 56 } |