14
14
import java .io .IOException ;
15
15
import java .util .Collection ;
16
16
import java .util .List ;
17
- import org .junit .jupiter .api .Test ;
17
+ import java .util .stream .Stream ;
18
+ import org .junit .jupiter .params .ParameterizedTest ;
19
+ import org .junit .jupiter .params .provider .MethodSource ;
18
20
19
21
public class ECJJava15IRTest extends IRTests {
20
22
@@ -39,241 +41,39 @@ protected Iterable<Entrypoint> makeDefaultEntrypoints(IClassHierarchy cha) {
39
41
return engine ;
40
42
}
41
43
42
- @ Test
43
- public void testVarargsOverriding ()
44
+ static Stream <String > java15IRTestNames () {
45
+ return Stream .of (
46
+ "AnonGeneNullarySimple" ,
47
+ "AnonymousGenerics" ,
48
+ "Annotations" ,
49
+ "BasicsGenerics" ,
50
+ "Cocovariant" ,
51
+ "CustomGenericsAndFields" ,
52
+ "EnumSwitch" ,
53
+ "ExplicitBoxingTest" ,
54
+ "GenericArrays" ,
55
+ "GenericMemberClasses" ,
56
+ "GenericSuperSink" ,
57
+ "MoreOverriddenGenerics" ,
58
+ "NotSoSimpleEnums" ,
59
+ "OverridesOnePointFour" ,
60
+ "SimpleEnums" ,
61
+ "SimpleEnums2" ,
62
+ "TypeInferencePrimAndStringOp" ,
63
+ "Varargs" ,
64
+ "VarargsCovariant" ,
65
+ "VarargsOverriding" ,
66
+ "Wildcards" );
67
+ }
68
+
69
+ @ ParameterizedTest
70
+ @ MethodSource ("java15IRTestNames" )
71
+ public void runJava15IRTests (String java15IRTestName )
44
72
throws IllegalArgumentException , CancelException , IOException {
45
73
runTest (
46
- singlePkgTestSrc ("javaonepointfive" ),
74
+ singlePkgTestSrc ("javaonepointfive" , java15IRTestName ),
47
75
rtJar ,
48
- simplePkgTestEntryPoint ("javaonepointfive" ),
49
- emptyList ,
50
- true ,
51
- null );
52
- }
53
-
54
- @ Test
55
- public void testEnumSwitch () throws IllegalArgumentException , CancelException , IOException {
56
- runTest (
57
- singlePkgTestSrc ("javaonepointfive" ),
58
- rtJar ,
59
- simplePkgTestEntryPoint ("javaonepointfive" ),
60
- emptyList ,
61
- true ,
62
- null );
63
- }
64
-
65
- @ Test
66
- public void testOverridesOnePointFour ()
67
- throws IllegalArgumentException , CancelException , IOException {
68
- runTest (
69
- singlePkgTestSrc ("javaonepointfive" ),
70
- rtJar ,
71
- simplePkgTestEntryPoint ("javaonepointfive" ),
72
- emptyList ,
73
- true ,
74
- null );
75
- }
76
-
77
- @ Test
78
- public void testVarargsCovariant () throws IllegalArgumentException , CancelException , IOException {
79
- runTest (
80
- singlePkgTestSrc ("javaonepointfive" ),
81
- rtJar ,
82
- simplePkgTestEntryPoint ("javaonepointfive" ),
83
- emptyList ,
84
- true ,
85
- null );
86
- }
87
-
88
- @ Test
89
- public void testSimpleEnums () throws IllegalArgumentException , CancelException , IOException {
90
- runTest (
91
- singlePkgTestSrc ("javaonepointfive" ),
92
- rtJar ,
93
- simplePkgTestEntryPoint ("javaonepointfive" ),
94
- emptyList ,
95
- true ,
96
- null );
97
- }
98
-
99
- @ Test
100
- public void testGenericSuperSink () throws IllegalArgumentException , CancelException , IOException {
101
- runTest (
102
- singlePkgTestSrc ("javaonepointfive" ),
103
- rtJar ,
104
- simplePkgTestEntryPoint ("javaonepointfive" ),
105
- emptyList ,
106
- true ,
107
- null );
108
- }
109
-
110
- @ Test
111
- public void testAnonGeneNullarySimple ()
112
- throws IllegalArgumentException , CancelException , IOException {
113
- runTest (
114
- singlePkgTestSrc ("javaonepointfive" ),
115
- rtJar ,
116
- simplePkgTestEntryPoint ("javaonepointfive" ),
117
- emptyList ,
118
- true ,
119
- null );
120
- }
121
-
122
- @ Test
123
- public void testAnonymousGenerics ()
124
- throws IllegalArgumentException , CancelException , IOException {
125
- runTest (
126
- singlePkgTestSrc ("javaonepointfive" ),
127
- rtJar ,
128
- simplePkgTestEntryPoint ("javaonepointfive" ),
129
- emptyList ,
130
- true ,
131
- null );
132
- }
133
-
134
- @ Test
135
- public void testNotSoSimpleEnums () throws IllegalArgumentException , CancelException , IOException {
136
- runTest (
137
- singlePkgTestSrc ("javaonepointfive" ),
138
- rtJar ,
139
- simplePkgTestEntryPoint ("javaonepointfive" ),
140
- emptyList ,
141
- true ,
142
- null );
143
- }
144
-
145
- @ Test
146
- public void testVarargs () throws IllegalArgumentException , CancelException , IOException {
147
- runTest (
148
- singlePkgTestSrc ("javaonepointfive" ),
149
- rtJar ,
150
- simplePkgTestEntryPoint ("javaonepointfive" ),
151
- emptyList ,
152
- true ,
153
- null );
154
- }
155
-
156
- @ Test
157
- public void testGenericArrays () throws IllegalArgumentException , CancelException , IOException {
158
- runTest (
159
- singlePkgTestSrc ("javaonepointfive" ),
160
- rtJar ,
161
- simplePkgTestEntryPoint ("javaonepointfive" ),
162
- emptyList ,
163
- true ,
164
- null );
165
- }
166
-
167
- @ Test
168
- public void testAnnotations () throws IllegalArgumentException , CancelException , IOException {
169
- runTest (
170
- singlePkgTestSrc ("javaonepointfive" ),
171
- rtJar ,
172
- simplePkgTestEntryPoint ("javaonepointfive" ),
173
- emptyList ,
174
- true ,
175
- null );
176
- }
177
-
178
- @ Test
179
- public void testCocovariant () throws IllegalArgumentException , CancelException , IOException {
180
- runTest (
181
- singlePkgTestSrc ("javaonepointfive" ),
182
- rtJar ,
183
- simplePkgTestEntryPoint ("javaonepointfive" ),
184
- emptyList ,
185
- true ,
186
- null );
187
- }
188
-
189
- @ Test
190
- public void testExplicitBoxingTest ()
191
- throws IllegalArgumentException , CancelException , IOException {
192
- runTest (
193
- singlePkgTestSrc ("javaonepointfive" ),
194
- rtJar ,
195
- simplePkgTestEntryPoint ("javaonepointfive" ),
196
- emptyList ,
197
- true ,
198
- null );
199
- }
200
-
201
- @ Test
202
- public void testWildcards () throws IllegalArgumentException , CancelException , IOException {
203
- runTest (
204
- singlePkgTestSrc ("javaonepointfive" ),
205
- rtJar ,
206
- simplePkgTestEntryPoint ("javaonepointfive" ),
207
- emptyList ,
208
- true ,
209
- null );
210
- }
211
-
212
- @ Test
213
- public void testBasicsGenerics () throws IllegalArgumentException , CancelException , IOException {
214
- runTest (
215
- singlePkgTestSrc ("javaonepointfive" ),
216
- rtJar ,
217
- simplePkgTestEntryPoint ("javaonepointfive" ),
218
- emptyList ,
219
- true ,
220
- null );
221
- }
222
-
223
- @ Test
224
- public void testCustomGenericsAndFields ()
225
- throws IllegalArgumentException , CancelException , IOException {
226
- runTest (
227
- singlePkgTestSrc ("javaonepointfive" ),
228
- rtJar ,
229
- simplePkgTestEntryPoint ("javaonepointfive" ),
230
- emptyList ,
231
- true ,
232
- null );
233
- }
234
-
235
- @ Test
236
- public void testTypeInferencePrimAndStringOp ()
237
- throws IllegalArgumentException , CancelException , IOException {
238
- runTest (
239
- singlePkgTestSrc ("javaonepointfive" ),
240
- rtJar ,
241
- simplePkgTestEntryPoint ("javaonepointfive" ),
242
- emptyList ,
243
- true ,
244
- null );
245
- }
246
-
247
- @ Test
248
- public void testSimpleEnums2 () throws IllegalArgumentException , CancelException , IOException {
249
- runTest (
250
- singlePkgTestSrc ("javaonepointfive" ),
251
- rtJar ,
252
- simplePkgTestEntryPoint ("javaonepointfive" ),
253
- emptyList ,
254
- true ,
255
- null );
256
- }
257
-
258
- @ Test
259
- public void testGenericMemberClasses ()
260
- throws IllegalArgumentException , CancelException , IOException {
261
- runTest (
262
- singlePkgTestSrc ("javaonepointfive" ),
263
- rtJar ,
264
- simplePkgTestEntryPoint ("javaonepointfive" ),
265
- emptyList ,
266
- true ,
267
- null );
268
- }
269
-
270
- @ Test
271
- public void testMoreOverriddenGenerics ()
272
- throws IllegalArgumentException , CancelException , IOException {
273
- runTest (
274
- singlePkgTestSrc ("javaonepointfive" ),
275
- rtJar ,
276
- simplePkgTestEntryPoint ("javaonepointfive" ),
76
+ simplePkgTestEntryPoint ("javaonepointfive" , java15IRTestName ),
277
77
emptyList ,
278
78
true ,
279
79
null );
0 commit comments