comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/loop/LoopInline.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 5d0925455be1
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.loop; 23 package com.oracle.graal.jtt.loop;
24 24
25 import com.oracle.graal.jtt.*;
25 import org.junit.*; 26 import org.junit.*;
26 27
27 public class LoopInline { 28 public class LoopInline extends JTTTest {
28 29
29 public static int test(int arg) { 30 public static int test(int arg) {
30 int count = 0; 31 int count = 0;
31 for (int i = 0; i < arg; i++) { 32 for (int i = 0; i < arg; i++) {
32 count += foo(i); 33 count += foo(i);
60 return sum; 61 return sum;
61 } 62 }
62 63
63 @Test 64 @Test
64 public void run0() throws Throwable { 65 public void run0() throws Throwable {
65 Assert.assertEquals(0, test(0)); 66 runTest("test", 0);
66 } 67 }
67 68
68 @Test 69 @Test
69 public void run1() throws Throwable { 70 public void run1() throws Throwable {
70 Assert.assertEquals(402, test(10)); 71 runTest("test", 10);
71 } 72 }
72 73
73 } 74 }