Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

ajc153.xml 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <!-- AspectJ v1.5.3 Tests -->
  3. <suite>
  4. <ajc-test dir="bugs153/pr152871" title="parsing bytecode less">
  5. <compile files="MyClass.java" options="-1.5"/>
  6. <compile files="MyAspect.java" options="-1.5 -Xlint:ignore"/>
  7. <run class="a.MyClass" ltw="aop.xml">
  8. <stdout>
  9. <line text="advice running"/>
  10. <line text="hello"/>
  11. <line text="advice running"/>
  12. <line text="world"/>
  13. </stdout>
  14. </run>
  15. </ajc-test>
  16. <ajc-test dir="bugs153/pr153380/case1" title="pipelining decps">
  17. <compile files="Ann.java,Base.java,BaseImpl.java,I1.java,Mixin.java,Runner.java,X.aj" options="-1.5">
  18. <message kind="error" line="1" text="The import java.lang.retention cannot be resolved"/>
  19. <message kind="error" line="3" text="Retention cannot be resolved to a type"/>
  20. </compile>
  21. </ajc-test>
  22. <ajc-test dir="bugs153/pr154332" title="incorrect deprecated annotation processing">
  23. <compile files="Annot.java" options="-1.5">
  24. <message kind="warning" line="5" text="marker"/>
  25. <message kind="warning" line="31" text="marker"/>
  26. <message kind="warning" line="5" text="deprecated"/>
  27. <message kind="warning" line="31" text="deprecated"/>
  28. </compile>
  29. </ajc-test>
  30. <ajc-test dir="bugs153/pr148381" title="argNames and javac">
  31. <!--compile files="C.java" options="-1.5"/>
  32. <compile files="A.java" options="-1.5"/-->
  33. <compile files="Main.java,Monitor.java" options="-1.5" outjar="foo.jar" classpath="code.jar"/>
  34. <run class="test.Main" classpath="$sandbox/code.jar" ltw="aop.xml">
  35. <stderr>
  36. <line text="goo"/>
  37. </stderr>
  38. </run>
  39. </ajc-test>
  40. <ajc-test dir="bugs153/PR148219" title="unwanted warning for pointcut">
  41. <compile files="MyMessages.java" options="-1.5 -Xlint:ignore -warn:+unusedArgument"/>
  42. </ajc-test>
  43. <ajc-test dir="bugs153/pr148737" title="illegalstateexception for non generic type">
  44. <compile files="A.java" options="-source 5 -target 5">
  45. <message kind="warning" line="18" text="advice defined in TestAspect has not been applied"/>
  46. </compile>
  47. </ajc-test>
  48. <ajc-test dir="bugs153/pr149096" title="cflow xml concrete aspect">
  49. <compile files="SimpleTracing.aj" outjar="out.jar"/>
  50. <compile files="TestMain.aj"/>
  51. <run class="TestMain" ltw="aop-pr149096.xml"/>
  52. </ajc-test>
  53. <ajc-test dir="bugs153/pr149305/case1" title="ataj inheritance - 1">
  54. <compile files="AbstractOzonator.java,IdentityOzonator.java,User.java" options="-1.5"/>
  55. </ajc-test>
  56. <ajc-test dir="bugs153/pr149305/case2" title="ataj inheritance - 2">
  57. <compile files="com/codesrc/ozonator/identity/IdentityOzonator.java,com/codesrc/ozonator/identity/User.java,com/codesrc/ozonator/AbstractOzonator.java" options="-1.5"/>
  58. </ajc-test>
  59. <ajc-test dir="bugs153/pr149305/case2" title="ataj inheritance - 3">
  60. <compile files="com/codesrc/ozonator/AbstractOzonator.java,com/codesrc/ozonator/identity/IdentityOzonator.java,com/codesrc/ozonator/identity/User.java" options="-1.5"/>
  61. </ajc-test>
  62. <ajc-test dir="bugs153/pr148693" title="verification problem">
  63. <compile files="MyAspect.java" options="-1.5 -XterminateAfterCompilation=true"/>
  64. </ajc-test>
  65. <ajc-test dir="bugs153/pr148537" title="incorrect annotation value">
  66. <compile files="MyClass.java" options="-1.5">
  67. <message kind="error" line="5" text="Type mismatch: cannot convert from RetentionPolicy[] to RetentionPolicy"/>
  68. </compile>
  69. </ajc-test>
  70. <ajc-test dir="bugs153/pr145693" title="verifyErrNoTypeCflowField">
  71. <compile files="Event.java" outjar="cpath.jar"/>
  72. <compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/>
  73. <compile files="Sample.java" options="-Xlint:ignore" aspectpath="apath.jar" outjar="run.jar">
  74. <message kind="warning" line="8" text="Unable to determine match at this join point because the type 'Event' cannot be found"/>
  75. </compile>
  76. <run class="Sample" classpath="run.jar,apath.jar">
  77. <stderr>
  78. <line text="method running"/>
  79. </stderr>
  80. </run>
  81. </ajc-test>
  82. <ajc-test dir="bugs153/pr145693" title="verifyErrInpathNoTypeCflowField">
  83. <compile files="Event.java" outjar="cpath.jar"/>
  84. <compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/>
  85. <compile files="Sample.java" options="-Xlint:ignore" inpath="cpath.jar" aspectpath="apath.jar" outjar="run.jar"/>
  86. <run class="Sample" classpath="run.jar,apath.jar"/>
  87. </ajc-test>
  88. <ajc-test dir="bugs153/pr145693" title="cpathNoTypeCflowField">
  89. <compile files="Event.java" outjar="cpath.jar"/>
  90. <compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/>
  91. <compile files="Sample.java" options="-Xlint:ignore" classpath="cpath.jar" aspectpath="apath.jar" outjar="run.jar"/>
  92. <run class="Sample" classpath="run.jar,apath.jar"/>
  93. </ajc-test>
  94. <ajc-test dir="bugs153/pr148409" title="generic signature problem">
  95. <compile files="Blurgh.java" options="-1.5"/>
  96. <compile files="X.java" options="-1.5 -Xlint:ignore"/>
  97. <run class="Blurgh" options="-1.5" ltw="aop.xml"/>
  98. </ajc-test>
  99. <ajc-test dir="bugs153/pr149071" title="visibility problem">
  100. <compile files="AspectItd.java"/>
  101. </ajc-test>
  102. <ajc-test dir="bugs153/pr147841" title="advice not woven on aspectpath">
  103. <compile files="A.java" options="-Xlint:ignore" outjar="apath.jar"/>
  104. <!--compile files="C.java" outjar="cpa.jar" classpath="cpath.jar"/-->
  105. <compile files="C.java" options="-showWeaveInfo" aspectpath="apath.jar">
  106. <message kind="weave" text="foo"/>
  107. </compile>
  108. <run class="C">
  109. <stderr>
  110. <line text="foo"/>
  111. </stderr>
  112. </run>
  113. </ajc-test>
  114. <ajc-test dir="bugs153/pr145018" title="ataj crashing with cflow, if and args">
  115. <compile files="Broken.aj" options="-1.5"/>
  116. <run class="Broken">
  117. <stderr>
  118. <line text="ahhh"/>
  119. </stderr>
  120. </run>
  121. </ajc-test>
  122. <ajc-test dir="bugs153/pr150095" title="generics, inheritance and decp">
  123. <compile files="Foo.java" options="-1.5"/>
  124. </ajc-test>
  125. <ajc-test dir="bugs153/pr121805" title="ambiguous binding">
  126. <compile files="Complex.java"/>
  127. </ajc-test>
  128. <ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace before">
  129. <compile files="hello/HelloWorld.java hello/ThrowExceptionBefore.aj"/>
  130. <run class="hello.HelloWorld">
  131. <stderr>
  132. <line text="hello.HelloWorld.println(HelloWorld.java:13)"/>
  133. <!--line text="hello.HelloWorld.println(HelloWorld.java)"/-->
  134. <line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
  135. <line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
  136. </stderr>
  137. </run>
  138. </ajc-test>
  139. <ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace after">
  140. <compile files="hello/HelloWorld.java hello/ThrowExceptionAfter.aj"/>
  141. <run class="hello.HelloWorld">
  142. <stderr>
  143. <line text="hello.HelloWorld.println(HelloWorld.java:15)"/>
  144. <line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
  145. <line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
  146. </stderr>
  147. </run>
  148. </ajc-test>
  149. <ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace around">
  150. <compile files="hello/HelloWorld.java hello/ThrowExceptionAround.aj" options="-XnoInline"/>
  151. <run class="hello.HelloWorld">
  152. <stderr>
  153. <line text="hello.HelloWorld.println(HelloWorld.java:13)"/>
  154. <!--line text="hello.HelloWorld.println(HelloWorld.java:1)"/-->
  155. <line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
  156. <line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
  157. </stderr>
  158. </run>
  159. </ajc-test>
  160. <ajc-test dir="bugs153/pr149322" title="can't find type on interface call 1">
  161. <compile files="Interface.java"/>
  162. <compile
  163. files="Missing.java"
  164. outjar="missing.jar"
  165. />
  166. <compile files="TestWithMissing.java" classpath="missing.jar"/>
  167. <compile files="Aspect1.aj" options="-showWeaveInfo -inpath ." classpath="missing.jar">
  168. <message kind="weave" text="void Interface.interfaceMethod()"/>
  169. <message kind="weave" text="void Missing.interfaceMethod()"/>
  170. </compile>
  171. <compile files="Aspect1.aj" options="-Xlint:warning -showWeaveInfo -inpath .">
  172. <message kind="weave" text="void Interface.interfaceMethod()"/>
  173. <message kind="warning" text="can't determine superclass of missing type Missing"/>
  174. </compile>
  175. <run class="TestWithMissing">
  176. <stdout>
  177. <line text="Aspect1.before() interfaceMethod"/>
  178. <line text="Missing.interfaceMethod()"/>
  179. <!--
  180. <line text="Aspect1.before() interfaceMethod"/>
  181. -->
  182. <line text="Missing.interfaceMethod()"/>
  183. <line text="Missing.missingMethod()"/>
  184. </stdout>
  185. </run>
  186. </ajc-test>
  187. <ajc-test dir="bugs153/pr149322" title="can't find type on interface call 2">
  188. <compile files="Interface.java"/>
  189. <compile
  190. files="Missing.java"
  191. outjar="missing.jar"
  192. />
  193. <compile files="TestWithMissing.java" classpath="missing.jar"/>
  194. <compile files="Aspect2.aj" options="-showWeaveInfo -inpath ." classpath="missing.jar">
  195. <message kind="weave" text="void Interface.interfaceMethod()"/>
  196. <message kind="weave" text="void Missing.interfaceMethod()"/>
  197. </compile>
  198. <compile files="Aspect2.aj" options="-Xlint:warning -showWeaveInfo -inpath .">
  199. <message kind="weave" text="void Interface.interfaceMethod()"/>
  200. <message kind="warning" text="can't determine whether missing type Missing is an instance of Interface"/>
  201. <message kind="warning" text="can't determine superclass of missing type Missing"/>
  202. </compile>
  203. <run class="TestWithMissing">
  204. <stdout>
  205. <line text="Aspect2.before() interfaceMethod"/>
  206. <line text="Missing.interfaceMethod()"/>
  207. <!--
  208. <line text="Aspect2.before() interfaceMethod"/>
  209. -->
  210. <line text="Missing.interfaceMethod()"/>
  211. <line text="Missing.missingMethod()"/>
  212. </stdout>
  213. </run>
  214. </ajc-test>
  215. <ajc-test dir="bugs153/pr149322" title="can't find type on interface call 3">
  216. <compile files="Interface.java"/>
  217. <compile
  218. files="Missing.java"
  219. outjar="missing.jar"
  220. />
  221. <compile files="TestWithMissing.java" classpath="missing.jar"/>
  222. <compile files="Aspect3.aj" options="-showWeaveInfo -inpath ." classpath="missing.jar">
  223. <message kind="weave" text="void Interface.interfaceMethod()"/>
  224. <message kind="weave" text="void Missing.interfaceMethod()"/>
  225. </compile>
  226. <compile files="Aspect3.aj" options="-Xlint:warning -showWeaveInfo -inpath .">
  227. <message kind="weave" text="void Interface.interfaceMethod()"/>
  228. <message kind="warning" text="can't determine whether missing type Missing is an instance of Interface"/>
  229. <message kind="warning" text="can't determine superclass of missing type Missing"/>
  230. </compile>
  231. <run class="TestWithMissing">
  232. <stdout>
  233. <line text="Aspect3.before() interfaceMethod"/>
  234. <line text="Missing.interfaceMethod()"/>
  235. <!--
  236. <line text="Aspect3.before() interfaceMethod"/>
  237. -->
  238. <line text="Missing.interfaceMethod()"/>
  239. <line text="Missing.missingMethod()"/>
  240. </stdout>
  241. </run>
  242. </ajc-test>
  243. <ajc-test dir="bugs153" title="match volatile field">
  244. <compile files="pr150671.aj" options="-Xset:activateLightweightDelegates=false">
  245. <message kind="error" line="7" text="Changing state"/>
  246. <message kind="error" line="8" text="test"/>
  247. </compile>
  248. </ajc-test>
  249. <ajc-test dir="java5/ataspectj" title="Duplicate JVMTI agents">
  250. <compile files="HelloWorld.java"/>
  251. <compile files="MessageHandler.java"/>
  252. <!-- <compile files="Aspect.aj" options="-outxml"/> -->
  253. <compile files="Aspect.aj" options="-outxml -outjar aspects.jar"/>
  254. <ant file="ajc-ant.xml" target="Duplicate JVMTI agents" verbose="true"/>
  255. </ajc-test>
  256. <ajc-test dir="bugs153/pr151978" title="generics problem">
  257. <compile files="IMessage.java" options="-1.5">
  258. </compile>
  259. </ajc-test>
  260. <ajc-test dir="bugs153/pr152631" title="decp and cflowadder munger clash">
  261. <compile files="EMA.java" options="-1.5"/>
  262. </ajc-test>
  263. <ajc-test dir="bugs153/pr153572" title="LTWWorld with annotation matching">
  264. <compile
  265. files="Configurable.java, AnnotationMatcher.aj"
  266. options="-1.5"
  267. outjar="aspectlib.jar"
  268. outxmlfile="META-INF/aop.xml"/>
  269. <compile files="Configurable.java,Annotated.java,Main.java" options="-1.5" outjar="myapp.jar"/>
  270. <run class="Main" ltw="">
  271. <stdout>
  272. <line text="annotated type initialized"/>
  273. </stdout>
  274. </run>
  275. </ajc-test>
  276. </suite>