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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
|
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
<!-- AspectJ v1.5.1 Tests -->
<suite>
<!-- atDecp begin -->
<!-- something simple -->
<ajc-test dir="bugs151/atDecp/case1" title="atDecp - simple">
<compile files="MainClass.java" options="-1.5 -showWeaveInfo">
<message kind="weave" text="Extending interface set for type 'moody.AnnotationMoodImplementor' (MainClass.java) to include 'moody.AnnotationMoodIndicator$Moody' (MainClass.java)"/>
<message kind="weave" text="Type 'moody.AnnotationMoodImplementor' (MainClass.java) has intertyped method from 'moody.AnnotationMoodIndicator' (MainClass.java:'moody.Mood moody.AnnotationMoodIndicator$Moody.getMood()')"/>
<message kind="weave" text="Type 'moody.AnnotationMoodImplementor' (MainClass.java) has intertyped method from 'moody.AnnotationMoodIndicator' (MainClass.java:'void moody.AnnotationMoodIndicator$Moody.setMood(moody.Mood)')"/>
</compile>
<run class="moody.MainClass">
<stderr>
<line text="ami0's mood is HAPPY"/>
<line text="ami1's mood is now JOLLY"/>
<line text="ami0's mood is still HAPPY"/>
</stderr>
</run>
</ajc-test>
<!-- applying parent based on annotation -->
<ajc-test dir="bugs151/atDecp/case2" title="atDecp - annotation">
<compile files="MainClass.java" options="-1.5 -showWeaveInfo">
<message kind="weave" text="Extending interface set for type 'moody.AnnotationMoodImplementor' (MainClass.java) to include 'moody.AnnotationMoodIndicator$Moody' (MainClass.java)"/>
<message kind="weave" text="Type 'moody.AnnotationMoodImplementor' (MainClass.java) has intertyped method from 'moody.AnnotationMoodIndicator' (MainClass.java:'moody.Mood moody.AnnotationMoodIndicator$Moody.getMood()')"/>
<message kind="weave" text="Type 'moody.AnnotationMoodImplementor' (MainClass.java) has intertyped method from 'moody.AnnotationMoodIndicator' (MainClass.java:'void moody.AnnotationMoodIndicator$Moody.setMood(moody.Mood)')"/>
</compile>
<run class="moody.MainClass">
<stderr>
<line text="ami0's mood is HAPPY"/>
<line text="ami1's mood is now JOLLY"/>
<line text="ami0's mood is still HAPPY"/>
</stderr>
</run>
</ajc-test>
<!-- when interface is binary -->
<ajc-test dir="bugs151/atDecp/case3" title="atDecp - binary interface">
<compile files="Mood.java,Moody.java" outjar="moody.jar" options="-1.5"/>
<compile files="MainClass.java" classpath="moody.jar" options="-1.5 -showWeaveInfo">
<message kind="weave" text="Extending interface set for type 'theapp.AnnotationMoodImplementor' (MainClass.java) to include 'moody.Moody' (MainClass.java)"/>
<message kind="weave" text="Type 'theapp.AnnotationMoodImplementor' (MainClass.java) has intertyped method from 'theapp.AnnotationMoodIndicator' (MainClass.java:'moody.Mood moody.Moody.getMood()')"/>
<message kind="weave" text="Type 'theapp.AnnotationMoodImplementor' (MainClass.java) has intertyped method from 'theapp.AnnotationMoodIndicator' (MainClass.java:'void moody.Moody.setMood(moody.Mood)')"/>
</compile>
<run class="theapp.MainClass">
<stderr>
<line text="ami0's mood is HAPPY"/>
<line text="ami1's mood is now JOLLY"/>
<line text="ami0's mood is still HAPPY"/>
</stderr>
</run>
</ajc-test>
<!-- when interface is binary and implementation is not an inner -->
<ajc-test dir="bugs151/atDecp/case4" title="atDecp - binary interface - 2">
<compile files="Mood.java,Moody.java" outjar="moody.jar" options="-1.5"/>
<compile files="MainClass.java,AnnotationMoodImplementor.java,TheAspect.java,MoodyImpl.java" classpath="moody.jar" options="-1.5 -showWeaveInfo">
<message kind="weave" text="Extending interface set for type 'theapp.AnnotationMoodImplementor' (AnnotationMoodImplementor.java) to include 'moody.Moody' (TheAspect.java)"/>
<message kind="weave" text="Type 'theapp.AnnotationMoodImplementor' (AnnotationMoodImplementor.java) has intertyped method from 'theapp.AnnotationMoodIndicator' (TheAspect.java:'moody.Mood moody.Moody.getMood()')"/>
<message kind="weave" text="Type 'theapp.AnnotationMoodImplementor' (AnnotationMoodImplementor.java) has intertyped method from 'theapp.AnnotationMoodIndicator' (TheAspect.java:'void moody.Moody.setMood(moody.Mood)')"/>
</compile>
<run class="theapp.MainClass">
<stderr>
<line text="ami0's mood is HAPPY"/>
<line text="ami1's mood is now JOLLY"/>
<line text="ami0's mood is still HAPPY"/>
</stderr>
</run>
</ajc-test>
<!-- atDecp end -->
<ajc-test dir="bugs151/pr126560" title="@AJ deow doesn't throw an invalidAbsoluteTypeName when specify type in the same package">
<compile files="pkg1/C.java, pkg1/A.java" options="-1.5">
<message kind="error" line="8" text="error"/>
<message kind="warning" line="5" text="warning"/>
</compile>
</ajc-test>
<ajc-test dir="bugs151/pr126560" title="@AJ deow doesn't throw an invalidAbsoluteTypeName when specify type in the same file">
<compile files="pkg2/InOneFile.java" options="-1.5">
<message kind="warning" line="14" text="call hello"/>
<message kind="error" line="15" text="call hi"/>
</compile>
</ajc-test>
<ajc-test dir="bugs151/pr98901" title="annotations and itds">
<compile files="Failing.java" options="-1.5"/>
<run class="Failing">
<stderr>
<line text="On TestInterface:@TestAnnotation(value=true)" vm="1.5,1.6,1.7,1.8,9,10,11,12,13"/>
<line text="On TestInterface:@TestAnnotation(true)" vm="14+"/>
<line text="On Failing:@TestAnnotation(value=true)" vm="1.5,1.6,1.7,1.8,9,10,11,12,13"/>
<line text="On Failing:@TestAnnotation(true)" vm="14+"/>
</stderr>
</run>
</ajc-test>
<ajc-test dir="bugs151/pr98901" title="annotations and itds - 2">
<compile files="Failing2.java" options="-1.5"/>
<run class="Failing2">
<stderr>
<line text="On TestInterface:@TestAnnotation(value=true)" vm="1.5,1.6,1.7,1.8,9,10,11,12,13"/>
<line text="On TestInterface:@TestAnnotation(true)" vm="14+"/>
<line text="On Failing2:@TestAnnotation(value=true)" vm="1.5,1.6,1.7,1.8,9,10,11,12,13"/>
<line text="On Failing2:@TestAnnotation(true)" vm="14+"/>
</stderr>
</run>
</ajc-test>
<ajc-test dir="bugs151/pr132926" pr="132926" title="crashing on annotation type resolving with asm - 1">
<compile files="InputAnnotation.java,AffectedType.java" options="-1.5"/>
</ajc-test>
<ajc-test dir="bugs151/pr132926" pr="132926" title="crashing on annotation type resolving with asm - 2">
<compile files="InputAnnotation.java" outjar="foo.jar" options="-1.5"/>
<compile files="AffectedType.java" classpath="foo.jar" options="-1.5"/>
</ajc-test>
<ajc-test dir="bugs151/pr132926" pr="132926" title="crashing on annotation type resolving with asm - 3">
<compile files="InputAnnotation2.java" outjar="foo.jar" options="-1.5"/>
<compile files="AffectedType.java" classpath="foo.jar" options="-1.5">
<message kind="error" line="9" text="AffectedType is not a valid target for annotation InputAnnotation, this annotation can only be applied to these element types {METHOD}"/>
</compile>
</ajc-test>
<ajc-test dir="bugs151/pr133307" title="circular generics">
<compile files="Broken.aj" options="-1.5"/>
</ajc-test>
<ajc-test dir="bugs151/pr123553" title="generic advice parameters">
<compile files="A.java" options="-1.5"/>
<run class="A"/>
</ajc-test>
<ajc-test dir="bugs151/pr133298" title="doubly annotating a method with declare">
<compile files="DecA.java" options="-1.5"/>
<run class="DecA">
<stderr>
<line text="There are 2 annotations on public void m()"/>
<line text="1) One"/>
<line text="2) Two"/>
<line text="There are 2 annotations on public Target(int):"/>
<line text="1) Four"/>
<line text="2) Three"/>
<line text="There are 2 annotations on public int x:"/>
<line text="1) Five"/>
<line text="2) Six"/>
</stderr>
</run>
</ajc-test>
<ajc-test dir="bugs151/pr133298" title="doubly annotating a method with declare - 2">
<compile files="DecA2.java" options="-1.5"/>
<run class="DecA2">
<stderr>
<line text="There are 2 annotations on public void Target.m()"/>
<line text="1) One"/>
<line text="2) Two"/>
<line text="There are 2 annotations on public void A.m()"/>
<line text="1) One"/>
<line text="2) Two"/>
</stderr>
</run>
</ajc-test>
<ajc-test dir="bugs151/pr129566" title="arrayindexoutofbounds">
<compile files="SkipList.java" options="-1.5"/>
</ajc-test>
<ajc-test dir="bugs151" title="member types in generic types">
<compile files="pr122458.aj" options="-1.5 -emacssym"/>
</ajc-test>
<ajc-test dir="bugs151/pr127299" title="missing import gives funny message">
<compile files="ModelErrorConversion.aj" options="-1.5"/>
</ajc-test>
<ajc-test dir="bugs151/pr122742" title="@AJ VerifyError with @AfterThrowing and thisJoinPoint argument">
<compile files="AfterThrowingTest.java" options="-1.5"/>
<run class="AfterThrowingTest">
</run>
</ajc-test>
<ajc-test dir="bugs151/pr122742" title="@AJ VerifyError with @AfterReturning and thisJoinPoint argument">
<compile files="AfterReturningTest.java" options="-1.5"/>
<run class="AfterReturningTest">
</run>
</ajc-test>
<ajc-test dir="bugs151/pr120527" title="incorrect unused interface message">
<compile files="Bugs.aj" options="-warn:unusedPrivate"/>
</ajc-test>
<ajc-test dir="bugs151/pr123901" title="inlinevisitor NPE">
<compile files="A.java,B.java" options="-1.5">
<message kind="error" line="5" text="A cannot be resolved or is not a field"/>
</compile>
</ajc-test>
<ajc-test dir="bugs151" title="member types in generic types - 2">
<compile files="pr122458_2.aj" options="-1.5 -emacssym"/>
<run class="pr122458_2"/>
</ajc-test>
<ajc-test dir="bugs151/pr123695" title="Internal nullptr exception with complex declare annotation">
<compile files="InjectName.java,Main.java,MarkMyMethods.java,MarkMyMethodsAspect.java,NameAspect.java,Named.java,Read.java,Write.java" options="-1.5"/>
</ajc-test>
<ajc-test dir="bugs151/pr124105" title="hasMember problems with packages">
<compile files="com/test/IOption.java,com/test/IXOption.java,com/test/IYOption.java,com/test/IZOption.java,com/test/MyBrokenXOption.java,com/test/MyXOption.java,com/test/OptionAspect.aj,com/test/OptionType.java" options="-1.5 -XhasMember">
<message kind="error" line="4" text="IOption implementations must provide a constructor which accepts an OptionType"/>
</compile>
</ajc-test>
<ajc-test dir="bugs151/pr124803" title="generics and different numbers of type variables">
<compile files="Test.java,TestAspect.java" options="-1.5 -showWeaveInfo">
<message kind="weave" text="Join point 'method-execution(void Test.foo(java.lang.Number))' in Type 'Test' (Test.java:12) advised by after advice from 'TestAspect' (TestAspect.java:4)"/>
</compile>
<run class="Test">
<stderr>
<line text="Aspects:execution(void Test.foo(Number))"/>
</stderr>
</run>
</ajc-test>
<ajc-test dir="bugs151/pr124803" title="generics and different numbers of type variables - classes">
<compile files="Test2.java,TestAspect2.java" options="-1.5 -showWeaveInfo">
<message kind="weave" text="Join point 'method-execution(void Test2.foo(java.lang.Number))' in Type 'Test2' (Test2.java:12) advised by after advice from 'TestAspect2' (TestAspect2.java:4)"/>
<message kind="weave" text="Join point 'method-execution(void Generic1.foo(java.lang.Number))' in Type 'Generic1' (Test2.java:2) advised by after advice from 'TestAspect2' (TestAspect2.java:4) [with runtime test]"/>
</compile>
<run class="Test2">
<stderr>
<line text="Aspects:execution(void Test2.foo(Number))"/>
</stderr>
</run>
</ajc-test>
<ajc-test dir="bugs151/pr124808" title="parameterized collection fields matched via pointcut">
<compile files="Test.java,TestAspect.java" options="-1.5"/>
<run class="Test">
<stderr>
<line text="GO Aspects! get(Set Test.ints)"/>
</stderr>
</run>
</ajc-test>
<ajc-test dir="bugs151" title="calling inherited generic method from around advice">
<compile files="pr124999.aj" options="-1.5"/>
<run class="pr124999"/>
</ajc-test>
<ajc-test dir="bugs151/pr124654" title="generic aspects and annotations">
<compile files="GenericAnnotation.java,TestSubAspect.java" options="-1.5"/>
<run class="TestSubAspect">
<stderr>
<line text="Reference pointcut advice. interface MyAnnotation"/>
<line text="Inlined pointcut advice. interface MyAnnotation"/>
<line text="run running"/>
</stderr>
</run>
</ajc-test>
<ajc-test dir="bugs151" title="incorrectly referencing pointcuts">
<compile files="pr122452.aj" options="-1.5">
<message kind="warning" line="2" text="no match for this type name: Point [Xlint:invalidAbsoluteTypeName]"/>
<message kind="warning" line="3" text="no match for this type name: related.Hello [Xlint:invalidAbsoluteTypeName]"/>
<message kind="error" line="4" text="Syntax error on token "*", "(" expected"/>
</compile>
</ajc-test>
<ajc-test dir="bugs151" title="incorrectly referencing pointcuts - 2">
<compile files="pr122452_2.aj" options="-1.5">
<message kind="error" line="2" text="Syntax error on token "*", "(" expected"/>
</compile>
</ajc-test>
<ajc-test dir="bugs151/pr125080" title="mixing numbers of type parameters">
<compile files="Test.java" options="-1.5"/>
<run class="ConcreteAspect"/>
</ajc-test>
<ajc-test dir="bugs151/pr125080" title="mixing numbers of type parameters - 2">
<compile files="Test2.java" options="-1.5"/>
<run class="ConcreteAspect"/>
</ajc-test>
<ajc-test dir="bugs151/pr125295" title="new IProgramElement methods">
<compile files="pkg/C.java,pkg/A.aj" options="-emacssym"/>
</ajc-test>
<ajc-test dir="bugs151/pr125475" title="define empty pointcut using an annotation">
<compile files="TestEmptyPointcutAtAspect.java" options="-1.5"/>
</ajc-test>
<ajc-test dir="bugs151/pr125475" title="define empty pointcut using an annotation - 2">
<compile files="TestEmptyPointcutAtAspect2.java" options="-1.5 -showWeaveInfo">
<message kind="warning" line="10" text="advice defined in TestEmptyPointcutAtAspect2 has not been applied [Xlint:adviceDidNotMatch]"/>
</compile>
</ajc-test>
<ajc-test dir="bugs151/pr125475" title="define empty pointcut using aop.xml">
<compile files="Test.java TestAspect.aj"/>
<run class="Test" ltw="aop.xml"/>
</ajc-test>
<ajc-test dir="bugs151/pr128744" title="broken ltw">
<compile files="Hello.java World.java" options="-1.5" />
<run class="Hello" ltw="aop.xml">
<stdout>
<line text="Hello"/>
<line text="World"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs151/pr125699" title="inherit advice with this() and thisJoinPoint">
<compile files="Tracing.aj, TestTracing.aj, AtTestTracing.java" options="-1.5">
<message kind="warning" line="13" text="advice defined in Tracing has not been applied [Xlint:adviceDidNotMatch]"/>
<message kind="warning" line="8" text="advice defined in Tracing has not been applied [Xlint:adviceDidNotMatch]"/>
<message kind="warning" line="3" text="advice defined in Tracing has not been applied [Xlint:adviceDidNotMatch]"/>
</compile>
</ajc-test>
<ajc-test dir="bugs151/pr125699" title="inherit advice with this() and thisJoinPoint - 2">
<compile files="Tracing.aj, SubAbstractTracing.aj, SubAtAj.java" options="-1.5">
<message kind="warning" line="13" text="advice defined in Tracing has not been applied [Xlint:adviceDidNotMatch]"/>
<message kind="warning" line="8" text="advice defined in Tracing has not been applied [Xlint:adviceDidNotMatch]"/>
<message kind="warning" line="3" text="advice defined in Tracing has not been applied [Xlint:adviceDidNotMatch]"/>
</compile>
</ajc-test>
<ajc-test dir="bugs151/pr125810" title="warning when inherited pointcut not made concrete">
<compile files="SuperAspect.aj, SubAspect.aj, SubAtAspect.java" options="-1.5">
<message kind="error" line="3" text="inherited abstract pointcut SuperAspect.scope() is not made concrete in SubAspect"/>
<message kind="error" line="1" text="inherited abstract pointcut SuperAspect.scope() is not made concrete in SubAspect"/>
<message kind="error" line="3" text="inherited abstract pointcut SuperAspect.scope() is not made concrete in SubAtAspect"/>
<message kind="error" line="4" text="inherited abstract pointcut SuperAspect.scope() is not made concrete in SubAtAspect"/>
</compile>
</ajc-test>
<ajc-test dir="bugs151" title="E extends Enum(E) again">
<compile files="Pr126316.aj" options="-1.5"/>
</ajc-test>
<ajc-test dir="bugs151" title="@AJ without JoinPoint import">
<compile files="pr121616.java" options="-1.5">
<message kind="error" line="13" text="JoinPoint cannot be resolved to a type"/>
</compile>
</ajc-test>
<ajc-test dir="bugs151/pr122370" title="@AJ declare parents retains field state">
<compile files="moody/AnnotationMoodImplementor.java, moody/AnnotationMoodIndicator.java, moody/Mood.java, moody/MainClass.java" options="-1.5"/>
<run class="moody.MainClass">
<stdout>
<line text="ami0's mood is HAPPY"/>
<line text="ami1's mood is now JOLLY"/>
<line text="ami0's mood is still HAPPY"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs151" title="@AJ no npe with pointcut containing or, this and a wildcard">
<compile files="pr128237.java" options="-1.5"/>
</ajc-test>
<ajc-test dir="bugs151" title="Generic aspects with annotation type parameters">
<compile files="GenericAspectWithAnnotationTypeParameter.aj" options="-1.5"/>
<run class="GenericAspectWithAnnotationTypeParameter">
<stdout>
<line text="annotation match - no binding"/>
<line text="execution with annotation match"/>
<line text="annotation match - binding"/>
<line text="hello"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs151" title="Pointcut interfaces">
<compile files="pr130869.aj" options="-1.5">
<message kind="warning" line="30" text="no directly runnable classes"/>
</compile>
</ajc-test>
<ajc-test dir="bugs151" title="no ClassCastException with generic aspect and unknown type">
<compile files="pr131933.aj" options="-1.5">
<message kind="error" line="5" text="can't bind type name 'MyList'"/>
</compile>
</ajc-test>
<!-- New features down here... when they arent big enough to have their own test file -->
<ajc-test dir="features151/ptw" title="exposing withintype">
<compile files="ExposedType.java" options="-1.5"/>
<run class="ExposedType">
<stderr>
<line text="here I am execution(void ExposedTypeOne.foo()): for class ExposedTypeOne"/>
<line text="here I am execution(void ExposedTypeTwo.foo()): for class ExposedTypeTwo"/>
<line text="here I am execution(void ExposedTypeThree.foo()): for class ExposedTypeThree"/>
</stderr>
</run>
</ajc-test>
<ajc-test dir="features151/swallowedExceptions" title="swallowed exceptions">
<compile files="SwallowedException.java" options="-Xlint:warning">
<message kind="warning" line="11" text="Exception swallowed in catch block"/>
</compile>
</ajc-test>
<ajc-test dir="features151/swallowedExceptions" title="swallowed exceptions with xlint">
<compile files="SwallowedException.java">
</compile>
</ajc-test>
</suite>
|