comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/reflect/Array_setLong01.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
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_setLong01 { 32 public class Array_setLong01 extends JTTTest {
32 33
33 private static final long[] array = {-1, -1, -1}; 34 private static final long[] array = {-1, -1, -1};
34 35
35 public static long test(int i, long value) { 36 public static long test(int i, long value) {
36 Array.setLong(array, i, value); 37 Array.setLong(array, i, value);
37 return array[i]; 38 return array[i];
38 } 39 }
39 40
40 @Test 41 @Test
41 public void run0() throws Throwable { 42 public void run0() throws Throwable {
42 Assert.assertEquals(11L, test(0, 11L)); 43 runTest("test", 0, 11L);
43 } 44 }
44 45
45 @Test 46 @Test
46 public void run1() throws Throwable { 47 public void run1() throws Throwable {
47 Assert.assertEquals(21L, test(1, 21L)); 48 runTest("test", 1, 21L);
48 } 49 }
49 50
50 @Test 51 @Test
51 public void run2() throws Throwable { 52 public void run2() throws Throwable {
52 Assert.assertEquals(42L, test(0, 42L)); 53 runTest("test", 0, 42L);
53 } 54 }
54 55
55 @Test(expected = java.lang.ArrayIndexOutOfBoundsException.class) 56 @Test
56 public void run3() throws Throwable { 57 public void run3() throws Throwable {
57 test(3, 0L); 58 runTest("test", 3, 0L);
58 } 59 }
59 60
60 } 61 }