aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml
blob: 961c4010d715908911e84215f9e21ba500cdfd01 (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
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>

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

    <ajc-test dir="bugs153/pr152871" title="parsing bytecode less">
      <compile files="MyClass.java" options="-1.5"/>
      <compile files="MyAspect.java" options="-1.5 -Xlint:ignore"/>
      <run class="a.MyClass" ltw="aop.xml">
        <stdout>
          <line text="advice running"/>
          <line text="hello"/>
          <line text="advice running"/>
          <line text="world"/>
 	    </stdout>
      </run>
    </ajc-test>
    
    <ajc-test dir="bugs153/pr148381" title="argNames and javac">
      <!--compile files="C.java" options="-1.5"/>
      <compile files="A.java" options="-1.5"/-->
      <compile files="Main.java,Monitor.java" options="-1.5" outjar="foo.jar" classpath="code.jar"/>
      <run class="test.Main" classpath="$sandbox/code.jar" ltw="aop.xml">
        <stderr>
          <line text="goo"/>
 	    </stderr>
      </run>
    </ajc-test>
    
    <ajc-test dir="bugs153/pr148219" title="unwanted warning for pointcut">
      <compile files="MyMessages.java" options="-1.5 -Xlint:ignore -warn:+unusedArgument"/>
    </ajc-test>
    
    <ajc-test dir="bugs153/pr148737" title="illegalstateexception for non generic type">
      <compile files="A.java" options="-source 5 -target 5">
        <message kind="warning" line="18" text="advice defined in TestAspect has not been applied"/>
      </compile>
    </ajc-test>
         
    <ajc-test dir="bugs153/pr149096" title="cflow xml concrete aspect">
		<compile files="SimpleTracing.aj" outjar="out.jar"/>
		<compile files="TestMain.aj"/>
		<run class="TestMain" ltw="aop-pr149096.xml"/>
    </ajc-test>
    
    <ajc-test dir="bugs153/pr149305/case1" title="ataj inheritance - 1">
		<compile files="AbstractOzonator.java,IdentityOzonator.java,User.java" options="-1.5"/>
    </ajc-test>
    
    <ajc-test dir="bugs153/pr149305/case2" title="ataj inheritance - 2">
		<compile files="com/codesrc/ozonator/identity/IdentityOzonator.java,com/codesrc/ozonator/identity/User.java,com/codesrc/ozonator/AbstractOzonator.java" options="-1.5"/>
    </ajc-test>
    
    <ajc-test dir="bugs153/pr149305/case2" title="ataj inheritance - 3">
		<compile files="com/codesrc/ozonator/AbstractOzonator.java,com/codesrc/ozonator/identity/IdentityOzonator.java,com/codesrc/ozonator/identity/User.java" options="-1.5"/>
    </ajc-test>
    
    <ajc-test dir="bugs153/pr148693" title="verification problem">
		<compile files="MyAspect.java" options="-1.5 -XterminateAfterCompilation=true"/>
    </ajc-test>
    
    <ajc-test dir="bugs153/pr148537" title="incorrect annotation value">
		<compile files="MyClass.java" options="-1.5">
		  <message kind="error" line="5" text="Type mismatch: cannot convert from RetentionPolicy[] to RetentionPolicy"/>
		</compile>
    </ajc-test>
    
    <ajc-test dir="bugs153/pr145693" title="verifyErrNoTypeCflowField">
      <compile files="Event.java" outjar="cpath.jar"/>
      <compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/>
      <compile files="Sample.java" options="-Xlint:ignore" aspectpath="apath.jar" outjar="run.jar">
        <message kind="warning" line="8" text="Unable to determine match at this join point because the type 'Event' cannot be found"/>
      </compile>
      <run class="Sample" classpath="run.jar,apath.jar">
        <stderr>
          <line text="method running"/>
        </stderr>
      </run>
    </ajc-test>    

    <ajc-test dir="bugs153/pr145693" title="verifyErrInpathNoTypeCflowField">
      <compile files="Event.java" outjar="cpath.jar"/>
      <compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/>
      <compile files="Sample.java" options="-Xlint:ignore" inpath="cpath.jar" aspectpath="apath.jar" outjar="run.jar"/>
      <run class="Sample" classpath="run.jar,apath.jar"/>
    </ajc-test>    

    <ajc-test dir="bugs153/pr145693" title="cpathNoTypeCflowField">
      <compile files="Event.java" outjar="cpath.jar"/>
      <compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/>
      <compile files="Sample.java" options="-Xlint:ignore" classpath="cpath.jar" aspectpath="apath.jar" outjar="run.jar"/>
      <run class="Sample" classpath="run.jar,apath.jar"/>
    </ajc-test>    
    
     <ajc-test dir="bugs153/pr148409" title="generic signature problem">
      <compile files="Blurgh.java" options="-1.5"/>
      <compile files="X.java" options="-1.5 -Xlint:ignore"/>
      <run class="Blurgh" options="-1.5" ltw="aop.xml"/>
    </ajc-test>    
    
    <ajc-test dir="bugs153/pr149071" title="visibility problem">
      <compile files="AspectItd.java"/>
    </ajc-test>    
    
    <ajc-test dir="bugs153/pr147841" title="advice not woven on aspectpath">
      <compile files="A.java" options="-Xlint:ignore" outjar="apath.jar"/>
      <!--compile files="C.java" outjar="cpa.jar" classpath="cpath.jar"/-->
      <compile files="C.java" options="-showWeaveInfo" aspectpath="apath.jar">
        <message kind="weave" text="foo"/>
      </compile>
      <run class="C">
        <stderr>
          <line text="foo"/>
        </stderr>
      </run>
    </ajc-test>   
        
	<ajc-test dir="bugs153/pr145018" title="ataj crashing with cflow, if and args">
     <compile files="Broken.aj" options="-1.5"/>
     <run class="Broken">
       <stderr>
         <line text="ahhh"/>
       </stderr>
     </run>
    </ajc-test> 
    
	<ajc-test dir="bugs153/pr150095" title="generics, inheritance and decp">
     <compile files="Foo.java" options="-1.5"/>
    </ajc-test> 
    
	<ajc-test dir="bugs153/pr121805" title="ambiguous binding">
     <compile files="Complex.java"/>
    </ajc-test> 
    
	<ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace before">
     <compile files="hello/HelloWorld.java hello/ThrowExceptionBefore.aj"/>
     <run class="hello.HelloWorld">
		<stderr>
	    	<line text="hello.HelloWorld.println(HelloWorld.java:13)"/>
	    	<!--line text="hello.HelloWorld.println(HelloWorld.java)"/-->
	    	<line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
	    	<line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
		</stderr>
     </run>
    </ajc-test> 
    
	<ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace after">
     <compile files="hello/HelloWorld.java hello/ThrowExceptionAfter.aj"/>
     <run class="hello.HelloWorld">
		<stderr>
	    	<line text="hello.HelloWorld.println(HelloWorld.java:15)"/>
	    	<line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
	    	<line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
		</stderr>
     </run>
    </ajc-test> 
    
	<ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace around">
     <compile files="hello/HelloWorld.java hello/ThrowExceptionAround.aj" options="-XnoInline"/>
     <run class="hello.HelloWorld">
		<stderr>
	    	<line text="hello.HelloWorld.println(HelloWorld.java:13)"/>
	    	<!--line text="hello.HelloWorld.println(HelloWorld.java:1)"/-->
	    	<line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
	    	<line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
		</stderr>
     </run>
    </ajc-test> 
    
	<ajc-test dir="bugs153/pr149322" title="can't find type on interface call 1">
		<compile files="Interface.java"/>
        <compile
			files="Missing.java"
        	outjar="missing.jar"
        />
      	<compile files="TestWithMissing.java" classpath="missing.jar"/>
      	<compile files="Aspect1.aj" options="-showWeaveInfo -inpath ." classpath="missing.jar">
	        <message kind="weave" text="void Interface.interfaceMethod()"/>
	        <message kind="weave" text="void Missing.interfaceMethod()"/>
		</compile>	        
      	<compile files="Aspect1.aj" options="-Xlint:warning -showWeaveInfo -inpath .">
	        <message kind="weave" text="void Interface.interfaceMethod()"/>
	        <message kind="warning" text="can't determine superclass of missing type Missing"/>
		</compile>	        
      	<run class="TestWithMissing">
			<stdout>
	        	<line text="Aspect1.before() interfaceMethod"/>
	        	<line text="Missing.interfaceMethod()"/>
<!--	        	
	        	<line text="Aspect1.before() interfaceMethod"/>
-->
	        	<line text="Missing.interfaceMethod()"/>
	        	<line text="Missing.missingMethod()"/>
    		</stdout>
    	</run>
    </ajc-test>    
	<ajc-test dir="bugs153/pr149322" title="can't find type on interface call 2">
		<compile files="Interface.java"/>
        <compile
			files="Missing.java"
        	outjar="missing.jar"
        />
      	<compile files="TestWithMissing.java" classpath="missing.jar"/>
      	<compile files="Aspect2.aj" options="-showWeaveInfo -inpath ." classpath="missing.jar">
	        <message kind="weave" text="void Interface.interfaceMethod()"/>
	        <message kind="weave" text="void Missing.interfaceMethod()"/>
		</compile>	        
      	<compile files="Aspect2.aj" options="-Xlint:warning -showWeaveInfo -inpath .">
	        <message kind="weave" text="void Interface.interfaceMethod()"/>
	        <message kind="warning" text="can't determine whether missing type Missing is an instance of Interface"/>
	        <message kind="warning" text="can't determine superclass of missing type Missing"/>
		</compile>	        
      	<run class="TestWithMissing">
			<stdout>
	        	<line text="Aspect2.before() interfaceMethod"/>
	        	<line text="Missing.interfaceMethod()"/>
<!--	        	
	        	<line text="Aspect2.before() interfaceMethod"/>
-->
	        	<line text="Missing.interfaceMethod()"/>
	        	<line text="Missing.missingMethod()"/>
    		</stdout>
    	</run>
    </ajc-test>    
	<ajc-test dir="bugs153/pr149322" title="can't find type on interface call 3">
		<compile files="Interface.java"/>
        <compile
			files="Missing.java"
        	outjar="missing.jar"
        />
      	<compile files="TestWithMissing.java" classpath="missing.jar"/>
      	<compile files="Aspect3.aj" options="-showWeaveInfo -inpath ." classpath="missing.jar">
	        <message kind="weave" text="void Interface.interfaceMethod()"/>
	        <message kind="weave" text="void Missing.interfaceMethod()"/>
		</compile>	        
      	<compile files="Aspect3.aj" options="-Xlint:warning -showWeaveInfo -inpath .">
	        <message kind="weave" text="void Interface.interfaceMethod()"/>
	        <message kind="warning" text="can't determine whether missing type Missing is an instance of Interface"/>
	        <message kind="warning" text="can't determine superclass of missing type Missing"/>
		</compile>	        
      	<run class="TestWithMissing">
			<stdout>
	        	<line text="Aspect3.before() interfaceMethod"/>
	        	<line text="Missing.interfaceMethod()"/>
<!--	        	
	        	<line text="Aspect3.before() interfaceMethod"/>
-->
	        	<line text="Missing.interfaceMethod()"/>
	        	<line text="Missing.missingMethod()"/>
    		</stdout>
    	</run>
    </ajc-test>    
  
    <ajc-test dir="bugs153" title="match volatile field">
      <compile files="pr150671.aj" options="-Xset:activateLightweightDelegates=false">
        <message kind="error" line="7" text="Changing state"/>
        <message kind="error" line="8" text="test"/>
      </compile>
    </ajc-test>

    <ajc-test dir="java5/ataspectj" title="Duplicate JVMTI agents">
        <compile files="HelloWorld.java"/>
        <compile files="MessageHandler.java"/>
<!--        <compile files="Aspect.aj" options="-outxml"/> -->
        <compile files="Aspect.aj" options="-outxml -outjar aspects.jar"/>
        <ant file="ajc-ant.xml" target="Duplicate JVMTI agents" verbose="true"/>
    </ajc-test>
    
    <ajc-test dir="bugs153/pr151978" title="generics problem">
      <compile files="IMessage.java" options="-1.5">
      </compile>
    </ajc-test>
    
    <ajc-test dir="bugs153/pr152631" title="decp and cflowadder munger clash">
      <compile files="EMA.java" options="-1.5"/>
    </ajc-test>
    
</suite>