您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

ajc153.xml 12KB

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