1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
|
/*******************************************************************************
* Copyright (c) 2008 Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andy Clement - initial API and implementation
*******************************************************************************/
package org.aspectj.systemtest.ajc1612;
import java.io.File;
import junit.framework.Test;
import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.classfile.Method;
import org.aspectj.testing.XMLBasedAjcTestCase;
/**
* @author Andy Clement
*/
public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// public void testAnnoCopying_345515() {
// runTest("anno copying");
// }
// public void testDoubleITDF() throws Exception {
// runTest("double itdf");
// }
// public void testItdSplitCompilation_354683() throws Exception {
// runTest("itd split compilation");
// }
public void testPervasivePerthis_354470() throws Exception {
runTest("perthis too pervasive");
}
public void testPervasivePerthis_354470_2() throws Exception {
runTest("perthis too pervasive 2");
}
public void testPervasivePerthis_354470_3() throws Exception {
runTest("perthis too pervasive 3");
}
public void testNotEqualWithAnnotationValues_357013() throws Exception {
runTest("annotation values not equal");
}
public void testNotEqualWithAnnotationValues_357013_2() throws Exception {
runTest("annotation values not equal 2");
}
public void testClassRef_357012() throws Exception {
runTest("class reference in annotation value");
}
public void testClassRefInvalidName_357012_2() throws Exception {
runTest("class reference in annotation value - invalid typename");
}
public void testClassRef_357012_3() throws Exception {
runTest("class reference in annotation value 3");
}
public void testAnnotationFieldBindingOptimization_356612() throws Exception {
runTest("annotation field binding optimization");
}
public void testAnnotationFieldBindingOptimization_356612_2() throws Exception {
runTest("annotation field binding optimization - 2");
}
public void testThisAspectInstance_239649_1() throws Exception {
// simple case
runTest("thisAspectInstance - 1");
}
public void testThisAspectInstance_239649_2() throws Exception {
// before advice toggling on/off through if called method
runTest("thisAspectInstance - 2");
}
public void testThisAspectInstance_239649_3() throws Exception {
// after advice toggling on/off through if called method
runTest("thisAspectInstance - 3");
}
public void testThisAspectInstance_239649_4() throws Exception {
// before advice, also using thisJoinPointStaticPart
runTest("thisAspectInstance - 4");
}
public void testThisAspectInstance_239649_5() throws Exception {
// before advice, also using thisJoinPoint
runTest("thisAspectInstance - 5");
}
public void testThisAspectInstance_239649_6() throws Exception {
// before advice, also using thisEnclosingJoinPointStaticPart
runTest("thisAspectInstance - 6");
}
public void testThisAspectInstance_239649_7() throws Exception {
// before advice, also using thisJoinPoint and thisJoinPointStaticPart
runTest("thisAspectInstance - 7");
}
public void testThisAspectInstance_239649_8() throws Exception {
// before advice, also using abstract aspects
runTest("thisAspectInstance - 8");
}
public void testThisAspectInstance_239649_9() throws Exception {
// before advice, also using abstract aspects 2
runTest("thisAspectInstance - 9");
}
public void testThisAspectInstance_239649_10() throws Exception {
// aspects in a package
runTest("thisAspectInstance - 10");
}
public void testThisAspectInstance_239649_11() throws Exception {
// non-singleton aspect - should be an error for now
runTest("thisAspectInstance - 11");
}
public void testThisAspectInstance_239649_12() throws Exception {
// arg binding and tjpsp
runTest("thisAspectInstance - 12");
}
public void testThisAspectInstance_239649_13() throws Exception {
// pass instance
runTest("thisAspectInstance - 13");
}
public void testThisAspectInstance_239649_14() throws Exception {
// multiple ifs
runTest("thisAspectInstance - 14");
}
public void testThisAspectInstance_239649_15() throws Exception {
// abstract aspects
runTest("thisAspectInstance - 15");
}
// public void testVerifyPerthis() throws Exception {
// runTest("verify perthis");
// }
public void testRangeForLocalVariables_353936() throws ClassNotFoundException {
runTest("local variable tables");
JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "X");
Method[] meths = jc.getMethods();
boolean checked = false;
for (int i = 0; i < meths.length; i++) {
Method method = meths[i];
if (method.getName().equals("ajc$before$X$2$3444dde4")) {
System.out.println(method.getName());
System.out.println(stringify(method.getLocalVariableTable()));
System.out.println(method.getCode().getLength());
checked = true;
assertEquals("LX; this(0) start=0 len=48", stringify(method.getLocalVariableTable(), 0));
assertEquals("Lorg/aspectj/lang/JoinPoint; thisJoinPoint(1) start=0 len=48",
stringify(method.getLocalVariableTable(), 1));
assertEquals("I i(2) start=8 len=22", stringify(method.getLocalVariableTable(), 2));
}
}
assertTrue(checked);
}
public void testEmptyPattern_pr352363() {
runTest("empty pattern");
}
public void testGenericsIssue_pr351592() {
runTest("generics issue");
}
public void testGenericsIssue_pr351592_2() {
runTest("generics issue - 2");
}
public void testGenericsNpe_pr350800() {
runTest("generics npe");
}
public void testGenericsNpe_pr350800_code() {
runTest("generics npe - code");
}
public void testGenericsNpe_pr350800_3() {
runTest("generics npe - 3");
}
public void testOrdering_pr349961() {
runTest("ordering");
}
public void testOrdering_pr349961_2() {
runTest("ordering - 2");
}
/*
* public void testVerifyError_pr347395() { runTest("verifyerror - inline"); }
*/
public void testDuplicateMethods_349398() {
runTest("duplicate methods");
}
public void testBindingInts_347684() {
runTest("binding ints");
}
public void testBindingInts_347684_2() {
runTest("binding ints - 2");
}
public void testBindingInts_347684_3() {
runTest("binding ints - 3");
}
public void testBindingInts_347684_4() {
runTest("binding ints - 4");
}
public void testBindingInts_347684_5() {
runTest("binding ints - 5");
}
public void testBindingInts_347684_6() {
runTest("binding ints - 6");
}
public void testIncorrectAnnos_345172() {
runTest("incorrect annos");
}
public void testIncorrectAnnos_345172_2() {
runTest("incorrect annos 2");
}
public void testIncorrectAnnos_345172_3() {
runTest("incorrect annos 3");
}
public void testSyntheticMethods_327867() {
runTest("synthetic methods");
}
// public void testSignedJarLtw_328099() {
// runTest("signed jar ltw");
// }
public void testVerifyError_315398() {
runTest("verifyerror");
}
public void testVerifyError_315398_2() {
runTest("verifyerror - 2");
}
public void testRawTypePointcut_327134() {
runTest("rawtype pointcut");
}
public void testRawTypeWarning_335810() {
runTest("rawtype warning");
}
// public void testDecpGenerics_344005() {
// runTest("decp generics");
// }
public void testIllegalAccessError_343051() {
runTest("illegalaccesserror");
}
public void testItitNpe_339974() {
runTest("itit npe");
}
// public void testNoImportError_342605() {
// runTest("noimporterror");
// }
public void testClashingLocalTypes_342323() {
runTest("clashing local types");
}
public void testITIT_338175() {
runTest("itit");
}
public void testThrowsClause_292239() {
runTest("throws clause");
}
public void testThrowsClause_292239_2() {
runTest("throws clause - 2");
}
// ---
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc1612Tests.class);
}
@Override
protected File getSpecFile() {
return new File("../tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml");
}
}
|