Mercurial > hg > truffle
comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/reflect/Class_getField02.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 | c38d2870439e |
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.reflect; | 23 package com.oracle.graal.jtt.reflect; |
24 | 24 |
25 import com.oracle.graal.jtt.*; | |
25 import org.junit.*; | 26 import org.junit.*; |
26 | 27 |
27 /* | 28 /* |
28 */ | 29 */ |
29 public class Class_getField02 { | 30 public class Class_getField02 extends JTTTest { |
30 | 31 |
31 public static String field; | 32 public static String field; |
32 public String field2; | 33 public String field2; |
33 String field3; | 34 String field3; |
34 | 35 |
39 static class Class_getField02b extends Class_getField02 { | 40 static class Class_getField02b extends Class_getField02 { |
40 | 41 |
41 public String field4; | 42 public String field4; |
42 } | 43 } |
43 | 44 |
44 @Test(expected = java.lang.NoSuchFieldException.class) | 45 @Test |
45 public void run0() throws Throwable { | 46 public void run0() throws Throwable { |
46 test("test"); | 47 runTest("test", "test"); |
47 } | 48 } |
48 | 49 |
49 @Test | 50 @Test |
50 public void run1() throws Throwable { | 51 public void run1() throws Throwable { |
51 Assert.assertEquals("field", test("field")); | 52 runTest("test", "field"); |
52 } | 53 } |
53 | 54 |
54 @Test | 55 @Test |
55 public void run2() throws Throwable { | 56 public void run2() throws Throwable { |
56 Assert.assertEquals("field2", test("field2")); | 57 runTest("test", "field2"); |
57 } | 58 } |
58 | 59 |
59 @Test(expected = java.lang.NoSuchFieldException.class) | 60 @Test |
60 public void run3() throws Throwable { | 61 public void run3() throws Throwable { |
61 test("field3"); | 62 runTest("test", "field3"); |
62 } | 63 } |
63 | 64 |
64 @Test | 65 @Test |
65 public void run4() throws Throwable { | 66 public void run4() throws Throwable { |
66 Assert.assertEquals("field4", test("field4")); | 67 runTest("test", "field4"); |
67 } | 68 } |
68 | 69 |
69 } | 70 } |