aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test/resources/org/aspectj/systemtest/ajc162/ajc162.xml
blob: d63e5002fef0254d6eaafd14b0e31cb660805898 (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
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>

<!-- AspectJ v1.6.2 Tests -->
<suite>


   <ajc-test dir="bugs162/pr247683" title="null delegate for array">
     <compile options="-1.5" files="A.java"/>
   </ajc-test>

   <ajc-test dir="bugs162/IntoBinary" title="binary aspects model">
     <compile options="-1.5 -emacssym" files="Clazz.java" aspectpath="binaryaspect.jar"/>
   </ajc-test>

   <ajc-test dir="bugs162/pr246918" title="ltw perclause">
     <compile options="-1.5" files="Code.java Dode.java" outjar="code.jar"/>
     <compile options="-1.5 -Xlint:ignore" files="Base.java" outjar="aspects.jar"/>
     <run class="Code" classpath="aspects.jar,code.jar" ltw="aop1.xml">
       <stderr>
         <line text="advice fired class Code"/>
         <line text="advice fired class Dode"/>
       </stderr>
     </run>
   </ajc-test>

   <ajc-test dir="bugs162/pr246918" title="ltw perclause - 2">
     <compile options="-1.5" files="Code.java Dode.java" outjar="code.jar"/>
     <compile options="-1.5 -Xlint:ignore" files="Base.java" outjar="aspects.jar"/>
     <run class="Code" classpath="aspects.jar,code.jar" ltw="aop2.xml">
       <stderr>
         <line text="advice fired class Dode"/>
       </stderr>
     </run>
   </ajc-test>

   <ajc-test dir="bugs162/pr246918" title="ltw perclause - 3">
     <compile options="-1.5" files="Code.java Dode.java" outjar="code.jar"/>
     <compile options="-1.5 -Xlint:ignore" files="Base2.java" outjar="aspects.jar"/>
     <run class="Code" classpath="aspects.jar,code.jar" ltw="aop3.xml">
       <stderr>
         <line text="advice fired class Dode"/>
       </stderr>
     </run>
   </ajc-test>

   <ajc-test dir="bugs162/pr246918" title="ltw perclause - 4">
     <compile options="-1.5" files="Code.java Dode.java" outjar="code.jar"/>
     <compile options="-1.5 -Xlint:ignore" files="Base2.java" outjar="aspects.jar"/>
     <run class="Code" classpath="aspects.jar,code.jar" ltw="aop4.xml">
       <stderr>
         <line text="Unrecognized per clause specified"/>
         <line text="Concrete-aspect 'SubAspect' could not be registered"/>
         <line text="warning failure(s) registering aspects."/>
       </stderr>
     </run>
   </ajc-test>

   <ajc-test dir="bugs162/pr246264" title="anno value binding">
     <compile options="-1.5" files="A.java"/>
     <run class="A"/>
   </ajc-test>

   <ajc-test dir="bugs162/pr211607" title="around advice proceed">
     <compile options="-1.5" files="Bug.java"/>
     <run class="Bug"/>
   </ajc-test>

	<ajc-test dir="bugs162/pr163005" title="advising joinpoints in interfaces">
	  <compile files="SomeClass.java SomeInterface.java ProblemAspect.java" options="-1.4">
	    <message kind="warning" text="Cannot advise join point 'method-call(java.lang.Class java.lang.Class.forName(java.lang.String))' in interface 'SomeInterface' with around advice from 'ProblemAspect.java' line '7' as it will lead to creation of code in an interface (compiler limitation, bug 163005)"/>
	  </compile>
	  <run class="SomeClass"/>
	</ajc-test>

    <ajc-test dir="bugs162/pr176905" title="chained itds">
        <compile options="-1.5" files="ChainedItd.aj">
        </compile>
        <run class="ChainedItd">
            <stderr/> <!-- no errors-->
        </run>
    </ajc-test>

   <ajc-test dir="bugs162/pr198341" title="dec atanno and decp">
     <compile options="-1.5 -showWeaveInfo" files="AnnotationAspect.java">
     	<message kind="weave" text="'Annotated' (AnnotationAspect.java:12) is annotated with @TestAnnotation2 type annotation from 'AnnotationAspect' (AnnotationAspect.java:18)"/>
     	<message kind="weave" text="Extending interface set for type 'Annotated' (AnnotationAspect.java) to include 'Marker' (AnnotationAspect.java)"/>
     </compile>
   </ajc-test>


	<ajc-test dir="bugs162/pr197720" title="missing markers on inherited annotated method">
	  <compile files="C1.java C2.java C3.java MyAnn.java MyAnnAspect.java" options="-1.5 -showWeaveInfo">
	    <message kind="weave" text="Join point 'method-call(void test.aspects.C1.aMethod())' in Type 'test.aspects.C1' (C1.java:12) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
	    <message kind="weave" text="Join point 'method-call(void test.aspects.C2.aMethod())' in Type 'test.aspects.C2$InnerClass' (C2.java:17) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
	    <message kind="weave" text="Join point 'method-call(void test.aspects.C2.aMethod())' in Type 'test.aspects.C2' (C2.java:7) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
	    <message kind="weave" text="Join point 'method-call(void test.aspects.C2.aMethod())' in Type 'test.aspects.C2' (C2.java:28) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
	    <message kind="weave" text="Join point 'method-call(void test.aspects.C1.aMethod())' in Type 'test.aspects.C3$InnerClass' (C3.java:22) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
	    <message kind="weave" text="Join point 'method-call(void test.aspects.C2.aMethod())' in Type 'test.aspects.C3$InnerClass' (C3.java:25) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
	    <message kind="weave" text="Join point 'method-call(void test.aspects.C1.aMethod())' in Type 'test.aspects.C3' (C3.java:8) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
	    <message kind="weave" text="Join point 'method-call(void test.aspects.C2.aMethod())' in Type 'test.aspects.C3' (C3.java:11) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
	    <message kind="weave" text="Join point 'method-call(void test.aspects.C1.aMethod())' in Type 'test.aspects.C3' (C3.java:32) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
	  </compile>
	</ajc-test>

	<ajc-test dir="bugs162/pr211146" title="lost generic sig on itd">
	  <compile files="GenericsLost.java" options="-1.5"/>
	  <run class="GenericsLost"/>
	</ajc-test>

	<ajc-test dir="bugs162/pr211146" title="lost generic sig on itd - 2">
	  <compile files="GenericsLost2.java" outjar="code.jar" options="-1.5"/>
	  <compile files="GenericsLost2Dep.java" classpath="$sandbox/code.jar" options="-1.5"/>
	</ajc-test>

	<ajc-test dir="bugs162/pr211146" title="lost generic sig on itd - 3">
	  <compile files="GenericsLost3.java" options="-1.5"/>
	  <run class="GenericsLost3"/>
	</ajc-test>

	<ajc-test dir="bugs162/pr211146" title="lost generic sig on itd - 4">
	  <compile files="GenericsLost4.java" options="-1.5"/>
	  <run class="GenericsLost4"/>
	</ajc-test>

	<ajc-test dir="bugs162/pr211146" title="lost generic sig on itd - 5">
	  <compile files="GenericsLost5.java" options="-1.5"/>
	  <run class="GenericsLost5"/>
	</ajc-test>

	<ajc-test dir="bugs162/pr194429" title="missing context">
	  <compile files="A.java" options="-1.5">
	    <message kind="error" line="14" text="incompatible type, expected java.util.Set found BindingTypePattern("/>
	  </compile>
	</ajc-test>

	<ajc-test dir="bugs162/pr210114" title="warnings for limitations">
	  <compile files="TestAspect.java" options="-1.5">
	  	<message kind="warning" text="Only before advice is supported on handler join points (compiler limitation)"/>
	  	<message kind="warning" text="around on initialization not supported (compiler limitation)"/>
	  	<message kind="warning" text="around on pre-initialization not supported (compiler limitation)"/>
	  </compile>
	</ajc-test>

	<ajc-test dir="bugs162/pr244830" title="ptw initFailureCause">
	  <compile files="PTW.java" options="-1.5"/>
	  <run class="PTW"/>
	</ajc-test>

	<ajc-test dir="bugs162/pr222648" title="generic itds - overrides">
	  <compile files="DataAspect.aj DataInterface.java Foo.java FooBase.java Marker.java Resource.java" options="-1.5"/>
	</ajc-test>

	<ajc-test dir="bugs162/pr222648" title="generic itds - overrides - 2">
	  <compile files="X.java" options="-1.5"/>
	</ajc-test>

 	<ajc-test dir="bugs162/pr145391" title="itd calling generic method">
     <compile files="GenericType.java" options="-1.5"/>
     <run class="GenericType"/>
    </ajc-test>

	<ajc-test dir="bugs162/pr145391" title="itd calling generic method - 2">
     <compile files="GenericType2.java" options="-1.5">
       <message kind="error" text="The method getValue(V) in the type GenericType2&lt;V&gt; is not applicable for the arguments"/>
     </compile>
    </ajc-test>

    <ajc-test dir="bugs162/pr241047" title="generic decp">
        <compile files="SomeAspect.java SomeBaseClass.java SomeSubClass.java SomeSubClass2.java SomeSubClass3.java SomeInterface.java SomeBaseClass2.java SomeBaseClass3.java" options=" -Xlint:ignore -1.5">
        </compile>
        <run class="SomeBaseClass">
          <stdout>
              <line text="correct advice :-)"/>
              <line text="some base method"/>
              <line text="correct advice :-)"/>
              <line text="some sub method"/>
              <line text="correct advice :-)"/>
              <line text="some base method2"/>
              <line text="correct advice :-)"/>
              <line text="some sub method2"/>
              <line text="correct advice :-)"/>
              <line text="some base method3"/>
              <line text="correct advice :-)"/>
              <line text="some sub method3"/>
          </stdout>
        </run>
    </ajc-test>

    <ajc-test dir="bugs162/pr241047/case2" title="generic decp - 2">
        <compile files="SomeAspect.java SomeBaseClass.java SomeSubClass.java SomeInterface.java" options=" -Xlint:ignore -1.5">
        </compile>
        <run class="SomeBaseClass">
          <stdout>
              <line text="correct advice :-)"/>
              <line text="some base method"/>
              <line text="correct advice :-)"/>
              <line text="some sub method"/>
          </stdout>
        </run>
    </ajc-test>

    <ajc-test dir="bugs162/pr239539" title="public pointcut">
        <compile files="PrintAround.java PrintAroundFoo.java Foo.java" options="-1.5">
	        <message kind="error" line="7" text="pointcut 'bar.PrintAround.method()' is not visible from type "/>
        </compile>
    </ajc-test>

    <ajc-test dir="bugs162/pr242797/case1" title="generic itds - 1">
        <compile files="ClassUtils.java CMEFinder.java Finder.java H2Deployment.java Localized.java LocalizedFinder.java OnetElement.java OnetFinder.java Partitioned.java PartitionedFinder.java" options="-1.5">
        </compile>
    </ajc-test>

    <ajc-test dir="bugs162/pr242797/case2" title="generic itds - 2">
        <compile files="GenericMethodAspect.aj GenericMethodInterface.java GenericMethodImpl.java" options="-1.5">
        </compile>
    </ajc-test>

    <ajc-test dir="bugs162/pr242797/case3" title="generic itds - 3">
        <compile files="GenericMethodAspect.aj GenericMethodInterface.java GenericMethodImpl.java GenericMethodImpl2.java Type1.java Type2.java" options="-1.5">
        </compile>
    </ajc-test>

  	<ajc-test dir="bugs162/pr241847" title="param annos pipelining">
    	<compile files="Asp.aj Ann.java CC.java II.java LongLong.java" options="-1.5 -showWeaveInfo">
    		<message kind="weave" text="Join point 'method-execution(void LongLong.m1(java.lang.String))' in Type 'LongLong' (LongLong.java:2) advised by before advice from 'Asp' (Asp.aj:5)"/>
    		<message kind="weave" line="3"/>
    	</compile>
    </ajc-test>

	<ajc-test dir="bugs162/pr239441" title="annotation decp">
    	<compile files="Test3.java SampleAspect.java" options="-1.5 -showWeaveInfo -XhasMember">
    	</compile>
    </ajc-test>

    <ajc-test dir="bugs162/pr241861" title="param annotation inner class">
     <compile files="Outer.java Ann.java Asp.java" options="-1.5 -showWeaveInfo">
       <message kind="weave" text="Join point 'constructor-execution(void Outer$Inner.&lt;init&gt;(Outer, java.lang.String))' in Type 'Outer$Inner' (Outer.java:5) advised by before advice from 'Asp' (Asp.java:2)"/>
     </compile>
    </ajc-test>

    <ajc-test dir="bugs162/pr241861" title="param annotation inner class - 2">
        <compile files="X.java" options="-1.5 -showWeaveInfo">
          <message kind="weave" text="Join point 'constructor-execution(void Outer$Inner.&lt;init&gt;(Outer, java.lang.Integer))' in Type 'Outer$Inner' (X.java:7) advised by before advice from 'Asp' (X.java:2)"/>
        </compile>
    </ajc-test>

    <ajc-test dir="bugs162/pr241861" title="param annotation inner class - 3">
        <compile files="Y.java" options="-1.5 -showWeaveInfo">
          <message kind="weave" text="Join point 'constructor-execution(void Outer$Inner.&lt;init&gt;(Outer, java.lang.String))' in Type 'Outer$Inner' (Y.java:7) advised by before advice from 'Asp' (Y.java:2)"/>
        </compile>
    </ajc-test>

    <ajc-test dir="bugs162/pr240693" title="privileged generics">
        <compile files="PayloadClass.java SomeInterface.java GenericClassInAdvice.java" options="-1.5">
          <message kind="warning" text="advice defined in GenericClassInAdvice has not been applied [Xlint:adviceDidNotMatch]"/>
        </compile>
    </ajc-test>

	<ajc-test dir="bugs162/pr238992" title="annotation value decp">
    	<compile files="Foo.java" options="-1.5 -showWeaveInfo">
    	  <message kind="weave" text="Extending interface set for type 'Goo'"/>
    	</compile>
    	<run class="Foo"/>
    </ajc-test>

	<ajc-test dir="bugs162/pr238992" title="annotation value decp - 2">
    	<compile files="Foo2.java" options="-1.5 -showWeaveInfo">
    	  <message kind="weave" text="Extending interface set for type 'Goo'"/>
    	  <message kind="weave" text="Extending interface set for type 'Hoo'"/>
    	</compile>
    	<run class="Foo2"/>
    </ajc-test>

	<ajc-test dir="bugs162/pr238992" title="annotation value decp - 3">
    	<compile files="Foo3.java" options="-1.5 -showWeaveInfo">
    	  <message kind="weave" text="Extending interface set for type 'Goo'"/>
    	</compile>
    	<run class="Foo3"/>
    </ajc-test>

	<ajc-test dir="bugs162/pr238992" title="annotation value decp - 4">
    	<compile files="Foo4.java" options="-1.5 -showWeaveInfo">
    	  <message kind="weave" text="Extending interface set for type 'Goo'"/>
    	  <message kind="weave" text="Extending interface set for type 'Hoo'"/>
    	</compile>
    	<run class="Foo4"/>
    </ajc-test>

	<ajc-test dir="bugs162/pr238992" title="annotation value decp - 5">
    	<compile files="Foo5.java" options="-1.5 -showWeaveInfo">
    	  <message kind="weave" text="Extending interface set for type 'Goo'"/>
    	  <message kind="weave" text="Extending interface set for type 'Hoo'"/>
    	</compile>
    	<run class="Foo5"/>
    </ajc-test>

    <ajc-test dir="bugs162/pr233718" title="parameter subsetting - matching">
        <compile files="Matching.java" options="-1.5 -showWeaveInfo">
          <message kind="weave" text="Join point 'method-execution(void Matching.m(java.lang.String))' in Type 'Matching' (Matching.java:3) advised by before advice from 'Matching' (Matching.java:8)"/>
          <message kind="weave" text="'method-execution(void Matching.m(java.lang.String, java.lang.String))' in Type 'Matching' (Matching.java:4) advised by before advice from 'Matching' (Matching.java:8)"/>
          <message kind="weave" text="'method-execution(void Matching.m(int, java.lang.String))' in Type 'Matching' (Matching.java:5) advised by before advice from 'Matching' (Matching.java:8)"/>
        </compile>
    </ajc-test>

    <ajc-test dir="bugs162/pr233718" title="parameter subsetting - args matching">
        <compile files="ArgsMatching.java" options="-1.5 -showWeaveInfo">
 <!--
          <message kind="weave" text="Join point 'method-execution(void Matching.m(java.lang.String))' in Type 'Matching' (Matching.java:3) advised by before advice from 'Matching' (Matching.java:8)"/>
          <message kind="weave" text="'method-execution(void Matching.m(java.lang.String, java.lang.String))' in Type 'Matching' (Matching.java:4) advised by before advice from 'Matching' (Matching.java:8)"/>
          <message kind="weave" text="'method-execution(void Matching.m(int, java.lang.String))' in Type 'Matching' (Matching.java:5) advised by before advice from 'Matching' (Matching.java:8)"/>
 -->
        </compile>
    </ajc-test>

    <ajc-test dir="bugs162/pr233718" title="parameter subsetting - args binding">
        <compile files="ArgsBinding.java" options="-1.5"/>
        <run class="ArgsBinding">
          <stdout>
            <line text="0) a"/>
            <line text="0) b"/>
          </stdout>
        </run>
    </ajc-test>

    <ajc-test dir="bugs162/pr198181" title="ataspectj ltw pertarget">
      <compile files="M.java" outjar="code.jar"/>
      <compile files="A.java" classpath="code.jar" options="-1.5 -Xlint:ignore"/>
      <run class="m.M" classpath="$sandbox/code.jar" ltw="aop.xml">
        <stdout>
          <line text="tick 0"/>
          <line text="tick 0"/>
          <line text="tick 0"/>
        </stdout>
      </run>
    </ajc-test>

</suite>