blob: f0ad3f4d3c5a4614931f14f673a7fd82475df7c3 (
plain)
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
|
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
<!-- AspectJ v1.5.0 Tests -->
<suite>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Aspect extending Aspect">
<compile files="Test001.java" options="-1.5">
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Aspect with codestyle pointcut">
<compile files="Test002.java" options="-1.5">
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="Codestyle Aspect with @Pointcut">
<compile files="Test003.java" options="-1.5">
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Pointcut declared on codestyle advice">
<compile files="Test004.java" options="-1.5">
<message kind="error" line="9" text="Only @AdviceName AspectJ annotation allowed on advice"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Aspect class extending @Aspect class">
<compile files="Test005.java" options="-1.5">
<message kind="error" line="9" text="cannot extend a concrete aspect"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="class with @Before extending @Aspect class">
<compile files="Test006.java" options="-1.5">
<message kind="error" line="10" text="a class cannot extend an aspect"/>
<message kind="error" line="12" text="Advice must be declared inside an aspect type"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Before declared on codestyle advice">
<compile files="Test007.java" options="-1.5">
<message kind="error" line="8" text="Duplicate annotation @Before"/>
<message kind="error" line="9" text="Only @AdviceName AspectJ annotation allowed on advice"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Pointcut not returning void">
<compile files="Test008.java" options="-1.5">
<message kind="error" line="10" text="Pointcuts should have an empty method body"/>
<message kind="error" line="10" text="Methods annotated with @Pointcut must return void"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Pointcut on @Aspect class constructor">
<compile files="Test009.java" options="-1.5">
<message kind="error" line="7" text="The annotation @Pointcut is disallowed for this location"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Aspect on interface">
<compile files="Test010.java" options="-1.5">
<message kind="error" line="6" text="only classes can have an @Aspect annotation"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Pointcut on non-aspect class method">
<compile files="Test011.java" options="-1.5">
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Before on non-aspect class method">
<compile files="Test012.java" options="-1.5">
<message kind="error" line="6" text="Syntax error on token """/>
<message kind="error" line="7" text="Advice must be declared inside an aspect type"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Pointcut on Interface method">
<compile files="Test013.java" options="-1.5">
<message kind="error" line="8" text="pointcuts can only be declared in a class or an aspect"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Pointcut with garbage string">
<compile files="Test014.java" options="-1.5">
<message kind="error" line="7" text="String literal is not properly closed by a double-quote"/>
<message kind="error" line="8" text="Syntax error, insert "}" to complete BlockStatements"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Pointcut with non-empty method body">
<compile files="Test015.java" options="-1.5">
<message kind="error" line="8" text="Pointcuts should have an empty method body"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Pointcut with throws clause">
<compile files="Test016.java" options="-1.5">
<message kind="error" line="8" text="pointcuts cannot throw exceptions!"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Aspect used badly">
<compile files="Test017.java" options="-1.5">
<message kind="error" line="5" text="Syntax error, insert "interface JavaIdentifier" to complete InterfaceHeader"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Before declared on @Aspect class constructor">
<compile files="Test018.java" options="-1.5">
<message kind="error" line="7" text="The annotation @Before is disallowed for this location"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@AfterReturning with wrong number of args">
<compile files="Test019.java" options="-1.5">
<message kind="error" line="7" text="formal unbound in pointcut"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Before on non-public method">
<compile files="Test020.java" options="-1.5">
<message kind="error" line="7" text="advice must be public"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Before on method not returning void">
<compile files="Test021.java" options="-1.5">
<message kind="error" line="7" text="This advice must return void"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Pointcut with wrong number of args">
<compile files="Test022.java" options="-1.5">
<message kind="error" line="8" text="formal unbound in pointcut"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@DeclareParents with interface extending interface">
<compile files="Test023.java" options="-1.5">
<message kind="error" line="11" text="@DeclareParents must be called before a class implementing a single interface"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@DeclareParents with interface extending interface">
<compile files="Test024.java" options="-1.5">
<message kind="error" line="13" text="@DeclareParents must be called before a class implementing a single interface"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@DeclareParents used outside of an Aspect">
<compile files="Test025.java" options="-1.5">
<message kind="error" line="9" text="@DeclareParents must be called inside an aspect"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@DeclareParents on an @Aspect">
<compile files="Test026.java" options="-1.5">
<message kind="error" line="11" text="@DeclareParents must be called before a class implementing a single interface"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@DeclareParents on an @Aspect with @DeclarePrecidence">
<compile files="Test027.java" options="-1.5">
<message kind="error" line="12" text="@DeclareParents must be called before a class implementing a single interface"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@DeclareWarning with a non-final String">
<compile files="Test028.java" options="-1.5">
<message kind="error" line="6" text="@DeclareWarning must be called before a static final String"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@DeclareWarning with a static final Object (that is a String)">
<compile files="Test029.java" options="-1.5">
<message kind="error" line="7" text="Is this an error?"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@DeclareWarning with a static final Integer">
<compile files="Test030.java" options="-1.5">
<message kind="error" line="6" text="@DeclareWarning must be called before a static final String"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Around given an extension of ProceedingJoinPoint">
<compile files="Test031.java" options="-1.5">
<message kind="error" line="11" text="formal unbound in pointcut"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="calling @Before advice explicitly as a method">
<compile files="Test032.java" options="-1.5">
<message kind="error" line="14" text="Advice should never be called explicitly"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Before on Interface method">
<compile files="Test033.java" options="-1.5">
<message kind="error" line="7" text="advice must be public"/>
<message kind="error" line="7" text="Advice must be declared inside an aspect type"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Aspect Aspect double declaration">
<compile files="Test034.java" options="-1.5">
<message kind="error" line="5" text="The annotation @Aspect is only allowed before a class definition"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Before and @After on one method">
<compile files="Test035.java" options="-1.5">
<message kind="error" line="7" text="The annotation @After is disallowed for this location"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Before twice on one method">
<compile files="Test036.java" options="-1.5">
<message kind="error" line="6" text="Duplicate annotation @Before"/>
<message kind="error" line="7" text="Duplicate annotation @Before"/>
<message kind="error" line="7" text="The annotation @Before is disallowed for this location"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Before advice with empty string">
<compile files="Test037.java" options="-1.5">
<message kind="error" line="6" text="Syntax error on token """/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="isPrivileged=truu misspelling">
<compile files="Test038.java" options="-1.5">
<message kind="error" line="5" text="The attribute isPrivileged is undefined for the annotation type Aspect"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Pointcut with an empty string">
<compile files="Test039.java" options="-1.5">
<message kind="error" line="11" text="Syntax error on token """/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@Before with && in string">
<compile files="Test040.java" options="-1.5">
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@AdviceName given an empty string">
<compile files="Test041.java" options="-1.5">
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@AdviceName used on @Before advice">
<compile files="Test042.java" options="-1.5">
<message kind="error" line="6" text="AdviceName annotation cannot be used for advice defined using annotation style"/>
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="The Moody example">
<compile files="Test043.java" options="-1.5">
</compile>
</ajc-test>
<ajc-test dir="java5/ataspectj/coverage"
pr="" title="@DeclareWarning">
<compile files="Test044.java" options="-1.5">
<message kind="warning" line="13" text="This call is warned"/>
</compile>
</ajc-test>
</suite>
|