Mercurial > hg > truffle
comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/lang/Class_getComponentType01.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 |
---|---|
22 */ | 22 */ |
23 /* | 23 /* |
24 */ | 24 */ |
25 package com.oracle.graal.jtt.lang; | 25 package com.oracle.graal.jtt.lang; |
26 | 26 |
27 import com.oracle.graal.jtt.*; | |
27 import org.junit.*; | 28 import org.junit.*; |
28 | 29 |
29 @SuppressWarnings("static-method") | 30 public final class Class_getComponentType01 extends JTTTest { |
30 public final class Class_getComponentType01 { | |
31 | 31 |
32 public static String test(int i) { | 32 public static String test(int i) { |
33 Class cl = Object.class; | 33 Class cl = Object.class; |
34 if (i == 0) { | 34 if (i == 0) { |
35 cl = int.class; | 35 cl = int.class; |
55 return cl.getName(); | 55 return cl.getName(); |
56 } | 56 } |
57 | 57 |
58 @Test | 58 @Test |
59 public void run0() throws Throwable { | 59 public void run0() throws Throwable { |
60 Assert.assertEquals(null, test(0)); | 60 runTest("test", 0); |
61 } | 61 } |
62 | 62 |
63 @Test | 63 @Test |
64 public void run1() throws Throwable { | 64 public void run1() throws Throwable { |
65 Assert.assertEquals("int", test(1)); | 65 runTest("test", 1); |
66 } | 66 } |
67 | 67 |
68 @Test | 68 @Test |
69 public void run2() throws Throwable { | 69 public void run2() throws Throwable { |
70 Assert.assertEquals(null, test(2)); | 70 runTest("test", 2); |
71 } | 71 } |
72 | 72 |
73 @Test | 73 @Test |
74 public void run3() throws Throwable { | 74 public void run3() throws Throwable { |
75 Assert.assertEquals("java.lang.Object", test(3)); | 75 runTest("test", 3); |
76 } | 76 } |
77 | 77 |
78 @Test | 78 @Test |
79 public void run4() throws Throwable { | 79 public void run4() throws Throwable { |
80 Assert.assertEquals(null, test(4)); | 80 runTest("test", 4); |
81 } | 81 } |
82 | 82 |
83 @Test | 83 @Test |
84 public void run5() throws Throwable { | 84 public void run5() throws Throwable { |
85 Assert.assertEquals(null, test(5)); | 85 runTest("test", 5); |
86 } | 86 } |
87 | 87 |
88 @Test | 88 @Test |
89 public void run6() throws Throwable { | 89 public void run6() throws Throwable { |
90 Assert.assertEquals("[Ljava.lang.Object;", test(6)); | 90 runTest("test", 6); |
91 } | 91 } |
92 | 92 |
93 @Test | 93 @Test |
94 public void run7() throws Throwable { | 94 public void run7() throws Throwable { |
95 Assert.assertEquals(null, test(7)); | 95 runTest("test", 7); |
96 } | 96 } |
97 | 97 |
98 @Test | 98 @Test |
99 public void run8() throws Throwable { | 99 public void run8() throws Throwable { |
100 Assert.assertEquals(null, test(8)); | 100 runTest("test", 8); |
101 } | 101 } |
102 | 102 |
103 } | 103 } |