comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/reflect/Array_getDouble01.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 0320e6278f84
comparison
equal deleted inserted replaced
7281:e960cda050d7 7282:390448a6b535
24 */ 24 */
25 package com.oracle.graal.jtt.reflect; 25 package com.oracle.graal.jtt.reflect;
26 26
27 import java.lang.reflect.*; 27 import java.lang.reflect.*;
28 28
29 import com.oracle.graal.jtt.*;
29 import org.junit.*; 30 import org.junit.*;
30 31
31 public class Array_getDouble01 { 32 public class Array_getDouble01 extends JTTTest {
32 33
33 private static final double[] array = {11.1d, 21.1d, 42.1d}; 34 private static final double[] array = {11.1d, 21.1d, 42.1d};
34 35
35 public static double test(int i) { 36 public static double test(int i) {
36 return Array.getDouble(array, i); 37 return Array.getDouble(array, i);
37 } 38 }
38 39
39 @Test 40 @Test
40 public void run0() throws Throwable { 41 public void run0() throws Throwable {
41 Assert.assertEquals(11.1d, test(0), 0); 42 runTestWithDelta(0, "test", 0);
42 } 43 }
43 44
44 @Test 45 @Test
45 public void run1() throws Throwable { 46 public void run1() throws Throwable {
46 Assert.assertEquals(21.1d, test(1), 0); 47 runTestWithDelta(0, "test", 1);
47 } 48 }
48 49
49 @Test 50 @Test
50 public void run2() throws Throwable { 51 public void run2() throws Throwable {
51 Assert.assertEquals(42.1d, test(2), 0); 52 runTestWithDelta(0, "test", 2);
52 } 53 }
53 54
54 @Test(expected = java.lang.ArrayIndexOutOfBoundsException.class) 55 @Test
55 public void run3() throws Throwable { 56 public void run3() throws Throwable {
56 test(3); 57 runTest("test", 3);
57 } 58 }
58 59
59 } 60 }