You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <!-- AspectJ v1.5.3 Tests -->
  3. <suite>
  4. <ajc-test dir="bugs153/pr159143" title="declare method annotations">
  5. <compile files="DeclareMethodAnnotation.java" options="-1.5">
  6. <message line="16" kind="warning" text="all"/>
  7. <message line="17" kind="warning" text="all"/>
  8. <message line="18" kind="warning" text="all"/>
  9. <message line="22" kind="warning" text="all"/>
  10. <message line="23" kind="warning" text="all"/>
  11. <message line="24" kind="warning" text="all"/>
  12. <message line="27" kind="warning" text="all"/>
  13. <message line="28" kind="warning" text="all"/>
  14. <message line="29" kind="warning" text="all"/>
  15. <message line="33" kind="warning" text="all"/>
  16. <message line="34" kind="warning" text="all"/>
  17. <message line="35" kind="warning" text="all"/>
  18. <message line="39" kind="warning" text="all"/>
  19. <message line="40" kind="warning" text="all"/>
  20. <message line="41" kind="warning" text="all"/>
  21. </compile>
  22. </ajc-test>
  23. <ajc-test dir="bugs153/pr148908" title="ensure getSourceSignature correct with static field">
  24. <compile files="BadInterface.java" options="-emacssym"/>
  25. </ajc-test>
  26. <ajc-test dir="bugs153/pr158624" title="generics and arrays">
  27. <compile files="ValueChange.java" options="-1.5"/>
  28. </ajc-test>
  29. <ajc-test dir="bugs153/pr153845" title="IllegalStateException at GenericSignatureParser.java">
  30. <compile files="GenericType.java,Aspect.java,Aspect2.java,Interface.java" options="-1.5" outjar="blob.jar"/>
  31. <compile files="Nothing.java" aspectpath="blob.jar" options="-1.5" outjar="bang.jar"/>
  32. </ajc-test>
  33. <ajc-test dir="bugs153/pr158412" title="annotation style pointcut npe">
  34. <compile files="layering/Layering.aj,layering/SystemArchitektur.java" options="-1.5"/>
  35. </ajc-test>
  36. <ajc-test dir="bugs153/pr153464" title="negated annotation matching problem">
  37. <compile files="Bug.java" options="-1.5">
  38. <message kind="warning" line="99"/>
  39. </compile>
  40. </ajc-test>
  41. <ajc-test dir="bugs153/pr158412" title="annotation style pointcut npe - 2">
  42. <compile files="layering/Layering.aj,layering/SystemArchitektur.java,dao/Foo.java" options="-1.5">
  43. <message kind="warning" line="3" text="Whatever"/>
  44. </compile>
  45. </ajc-test>
  46. <ajc-test dir="features153/ptw" title="basic usage of getWithinTypeName">
  47. <compile files="CaseOne.java"/>
  48. <run class="CaseOne">
  49. <stdout>
  50. <line text="AClass has an aspect instance"/>
  51. <line text="The aspect instance thinks it is for type name AClass"/>
  52. </stdout>
  53. </run>
  54. </ajc-test>
  55. <ajc-test dir="features153/ptw" title="basic usage of getWithinTypeName - annotation style">
  56. <compile files="CaseFive.java" options="-1.5"/>
  57. <run class="CaseFive">
  58. <stdout>
  59. <line text="AClass has an aspect instance"/>
  60. <line text="The aspect instance thinks it is for type name AClass"/>
  61. </stdout>
  62. </run>
  63. </ajc-test>
  64. <ajc-test dir="features153/ptw" title="basic usage of getWithinTypeName - multiple types">
  65. <compile files="CaseTwo.java"/>
  66. <run class="CaseTwo">
  67. <stdout>
  68. <line text="BClass aspect instance gives a within type name of BClass"/>
  69. <line text="CClass aspect instance gives a within type name of CClass"/>
  70. <line text="AClass aspect instance gives a within type name of AClass"/>
  71. </stdout>
  72. </run>
  73. </ajc-test>
  74. <ajc-test dir="features153/ptw" title="basic usage of getWithinTypeName - non matching types">
  75. <compile files="CaseThree.java"/>
  76. <run class="CaseThree">
  77. <stdout>
  78. <line text="BClass aspect instance gives a within type name of &lt;null&gt;"/>
  79. <line text="CClass aspect instance gives a within type name of CClass"/>
  80. <line text="AClass aspect instance gives a within type name of AClass"/>
  81. </stdout>
  82. </run>
  83. </ajc-test>
  84. <ajc-test dir="features153/ptw" title="basic usage of getWithinTypeName - types in packages">
  85. <compile files="CaseFour.java"/>
  86. <run class="a.b.CaseFour">
  87. <stdout>
  88. <line text="BClass aspect instance gives a within type name of a.b.BClass"/>
  89. <line text="CClass aspect instance gives a within type name of a.b.CClass"/>
  90. <line text="AClass aspect instance gives a within type name of a.b.AClass"/>
  91. </stdout>
  92. </run>
  93. </ajc-test>
  94. <ajc-test dir="bugs153/pr158126" title="annotations, call and constructors problem">
  95. <compile files="A.java,B.java,MyAnnotation.java,MyAspect.java" options="-1.5 -showWeaveInfo">
  96. <message kind="weave" text="Join point 'constructor-call(void B.&lt;init&gt;())' in Type 'A' (A.java:5) advised by before advice from 'MyAspect' (MyAspect.java:3)"/>
  97. <message kind="weave" text="Join point 'constructor-call(void B.&lt;init&gt;(int))' in Type 'A' (A.java:10) advised by before advice from 'MyAspect' (MyAspect.java:3)"/>
  98. <message kind="weave" text="Join point 'constructor-call(void A.&lt;init&gt;())' in Type 'A' (A.java:14) advised by before advice from 'MyAspect' (MyAspect.java:3)"/>
  99. <message kind="weave" text="Join point 'constructor-call(void A.&lt;init&gt;(int))' in Type 'A' (A.java:15) advised by before advice from 'MyAspect' (MyAspect.java:3)"/>
  100. </compile>
  101. </ajc-test>
  102. <ajc-test dir="bugs153/pr156058" title="no IllegalStateException with generic inner aspect">
  103. <compile files="Bug.java" options="-1.5">
  104. <message kind="warning" line="2" text="advice defined in MyAspect has not been applied [Xlint:adviceDidNotMatch]"/>
  105. </compile>
  106. </ajc-test>
  107. <ajc-test dir="bugs153/pr156058" title="no IllegalStateException with generic inner aspect - 2">
  108. <compile files="Bug2.java" options="-1.5 -showWeaveInfo">
  109. <message kind="weave" text="Join point 'method-call(MyClass Bug2.callit())' in Type 'Bug2' (Bug2.java:15) advised by before advice from 'MyAspect' (Bug2.java:2)"/>
  110. <message kind="warning" line="24" text="advice defined in MyAspect2 has not been applied [Xlint:adviceDidNotMatch]"/>
  111. </compile>
  112. </ajc-test>
  113. <ajc-test dir="bugs153/pr153490" title="no illegal state exception from AsmDelegate - 1">
  114. <compile files="Foo.java" options="-1.5" classpath="jarForFoo.jar" />
  115. </ajc-test>
  116. <ajc-test dir="bugs153/pr153490" title="no illegal state exception from AsmDelegate - 2">
  117. <compile files="Bar.java" options="-1.5" classpath="jarForBar.jar" />
  118. </ajc-test>
  119. <ajc-test dir="bugs153/pr153490" title="no illegal state exception from AsmDelegate - 3">
  120. <compile files="Goo.java" options="-1.5" classpath="jarForGoo.jar" />
  121. </ajc-test>
  122. <ajc-test dir="bugs153/pr156962" title="Test Annot Method">
  123. <compile files="Sample.java, WarnDeprecatedMethod.aj" options="-1.5">
  124. <message kind="warning" line="2" text="deprecated method"/>
  125. </compile>
  126. </ajc-test>
  127. <ajc-test dir="bugs153/pr156962" title="Test Annot Method Has Member">
  128. <compile files="Sample.java, LiftDeprecation.aj" options="-1.5 -XhasMember -showWeaveInfo -Xlint:ignore">
  129. <message kind="weave" text="'Sample' (Sample.java:1) is annotated with @Deprecated type annotation from 'LiftDeprecation' (LiftDeprecation.aj:2)"/>
  130. </compile>
  131. </ajc-test>
  132. <ajc-test dir="bugs153/pr152848" title="mixing generics">
  133. <compile files="PairGeneric.java" options="-1.5" outjar="pair.jar"/>
  134. <compile files="BaseType.java" options="-1.5" outjar="basetype.jar" classpath="pair.jar"/>
  135. <compile files="PairNormal.java" outjar="pair.jar"/>
  136. <compile files="AnAspect.java" options="-1.5 -Xset:runMinimalMemory=true" inpath="basetype.jar;pair.jar"/>
  137. </ajc-test>
  138. <ajc-test dir="bugs153/pr152871" title="parsing bytecode less">
  139. <compile files="MyClass.java" options="-1.5"/>
  140. <compile files="MyAspect.java" options="-1.5 -Xlint:ignore"/>
  141. <run class="a.MyClass" ltw="aop.xml">
  142. <stdout>
  143. <line text="advice running"/>
  144. <line text="hello"/>
  145. <line text="advice running"/>
  146. <line text="world"/>
  147. </stdout>
  148. </run>
  149. </ajc-test>
  150. <ajc-test dir="bugs153/pr160674" title="turning off bcel caching">
  151. <compile files="MyClass.java" options="-1.5"/>
  152. <compile files="MyAspect.java" options="-1.5 -Xlint:ignore"/>
  153. <run class="a.MyClass" ltw="aop.xml">
  154. <stdout>
  155. <line text="advice running"/>
  156. <line text="hello"/>
  157. <line text="advice running"/>
  158. <line text="world"/>
  159. </stdout>
  160. <stderr>
  161. <line text="info AspectJ Weaver Version"/>
  162. <line text="info register classloader"/>
  163. <line text="info using"/>
  164. <line text="info [bcelRepositoryCaching=false] AspectJ will not"/>
  165. <line text="info register aspect"/>
  166. <line text="info processing"/>
  167. <line text="info successfully"/>
  168. </stderr>
  169. </run>
  170. </ajc-test>
  171. <ajc-test dir="bugs153/pr153380/case1" title="pipelining decps">
  172. <compile files="Ann.java,Base.java,BaseImpl.java,I1.java,Mixin.java,Runner.java,X.aj" options="-1.5">
  173. <message kind="error" line="1" text="The import java.lang.retention cannot be resolved"/>
  174. <message kind="error" line="3" text="Retention cannot be resolved to a type"/>
  175. </compile>
  176. </ajc-test>
  177. <ajc-test dir="bugs153/pr154332" title="incorrect deprecated annotation processing">
  178. <compile files="Annot.java" options="-1.5">
  179. <message kind="warning" line="5" text="marker"/>
  180. <message kind="warning" line="31" text="marker"/>
  181. <message kind="warning" line="5" text="deprecated"/>
  182. <message kind="warning" line="31" text="deprecated"/>
  183. </compile>
  184. </ajc-test>
  185. <ajc-test dir="bugs153/pr148381" title="argNames and javac">
  186. <!--compile files="C.java" options="-1.5"/>
  187. <compile files="A.java" options="-1.5"/-->
  188. <compile files="Main.java,Monitor.java" options="-1.5" outjar="foo.jar" classpath="code.jar"/>
  189. <run class="test.Main" classpath="$sandbox/code.jar" ltw="aop.xml">
  190. <stderr>
  191. <line text="goo"/>
  192. </stderr>
  193. </run>
  194. </ajc-test>
  195. <ajc-test dir="bugs153/PR148219" title="unwanted warning for pointcut">
  196. <compile files="MyMessages.java" options="-1.5 -Xlint:ignore -warn:+unusedArgument"/>
  197. </ajc-test>
  198. <ajc-test dir="bugs153/pr148737" title="illegalstateexception for non generic type">
  199. <compile files="A.java" options="-source 5 -target 5">
  200. <message kind="warning" line="18" text="advice defined in TestAspect has not been applied"/>
  201. </compile>
  202. </ajc-test>
  203. <ajc-test dir="bugs153/pr149096" title="cflow xml concrete aspect">
  204. <compile files="SimpleTracing.aj" outjar="out.jar"/>
  205. <compile files="TestMain.aj"/>
  206. <run class="TestMain" ltw="aop-pr149096.xml"/>
  207. </ajc-test>
  208. <ajc-test dir="bugs153/pr149305/case1" title="ataj inheritance - 1">
  209. <compile files="AbstractOzonator.java,IdentityOzonator.java,User.java" options="-1.5"/>
  210. </ajc-test>
  211. <ajc-test dir="bugs153/pr149305/case2" title="ataj inheritance - 2">
  212. <compile files="com/codesrc/ozonator/identity/IdentityOzonator.java,com/codesrc/ozonator/identity/User.java,com/codesrc/ozonator/AbstractOzonator.java" options="-1.5"/>
  213. </ajc-test>
  214. <ajc-test dir="bugs153/pr149305/case2" title="ataj inheritance - 3">
  215. <compile files="com/codesrc/ozonator/AbstractOzonator.java,com/codesrc/ozonator/identity/IdentityOzonator.java,com/codesrc/ozonator/identity/User.java" options="-1.5"/>
  216. </ajc-test>
  217. <ajc-test dir="bugs153/pr148693" title="verification problem">
  218. <compile files="MyAspect.java" options="-1.5 -XterminateAfterCompilation=true"/>
  219. </ajc-test>
  220. <ajc-test dir="bugs153/pr148537" title="incorrect annotation value">
  221. <compile files="MyClass.java" options="-1.5">
  222. <message kind="error" line="5" text="Type mismatch: cannot convert from RetentionPolicy[] to RetentionPolicy"/>
  223. </compile>
  224. </ajc-test>
  225. <ajc-test dir="bugs153/pr145693" title="verifyErrNoTypeCflowField">
  226. <compile files="Event.java" outjar="cpath.jar"/>
  227. <compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/>
  228. <compile files="Sample.java" options="-Xlint:ignore" aspectpath="apath.jar" outjar="run.jar">
  229. <message kind="warning" line="8" text="Unable to determine match at this join point because the type 'Event' cannot be found"/>
  230. </compile>
  231. <run class="Sample" classpath="run.jar,apath.jar">
  232. <stderr>
  233. <line text="method running"/>
  234. </stderr>
  235. </run>
  236. </ajc-test>
  237. <ajc-test dir="bugs153/pr145693" title="verifyErrInpathNoTypeCflowField">
  238. <compile files="Event.java" outjar="cpath.jar"/>
  239. <compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/>
  240. <compile files="Sample.java" options="-Xlint:ignore" inpath="cpath.jar" aspectpath="apath.jar" outjar="run.jar"/>
  241. <run class="Sample" classpath="run.jar,apath.jar"/>
  242. </ajc-test>
  243. <ajc-test dir="bugs153/pr145693" title="cpathNoTypeCflowField">
  244. <compile files="Event.java" outjar="cpath.jar"/>
  245. <compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/>
  246. <compile files="Sample.java" options="-Xlint:ignore" classpath="cpath.jar" aspectpath="apath.jar" outjar="run.jar"/>
  247. <run class="Sample" classpath="run.jar,apath.jar"/>
  248. </ajc-test>
  249. <ajc-test dir="bugs153/pr148409" title="generic signature problem">
  250. <compile files="Blurgh.java" options="-1.5"/>
  251. <compile files="X.java" options="-1.5 -Xlint:ignore"/>
  252. <run class="Blurgh" options="-1.5" ltw="aop.xml"/>
  253. </ajc-test>
  254. <ajc-test dir="bugs153/pr149071" title="visibility problem">
  255. <compile files="AspectItd.java"/>
  256. <run class="AspectItd"/>
  257. </ajc-test>
  258. <ajc-test dir="bugs153/pr147841" title="advice not woven on aspectpath">
  259. <compile files="A.java" options="-Xlint:ignore" outjar="apath.jar"/>
  260. <!--compile files="C.java" outjar="cpa.jar" classpath="cpath.jar"/-->
  261. <compile files="C.java" options="-showWeaveInfo" aspectpath="apath.jar">
  262. <message kind="weave" text="foo"/>
  263. </compile>
  264. <run class="C">
  265. <stderr>
  266. <line text="foo"/>
  267. </stderr>
  268. </run>
  269. </ajc-test>
  270. <ajc-test dir="bugs153/pr145018" title="ataj crashing with cflow, if and args">
  271. <compile files="Broken.aj" options="-1.5"/>
  272. <run class="Broken">
  273. <stderr>
  274. <line text="ahhh"/>
  275. </stderr>
  276. </run>
  277. </ajc-test>
  278. <ajc-test dir="bugs153/pr150095" title="generics, inheritance and decp">
  279. <compile files="Foo.java" options="-1.5"/>
  280. </ajc-test>
  281. <ajc-test dir="bugs153/pr121805" title="ambiguous binding">
  282. <compile files="Complex.java"/>
  283. </ajc-test>
  284. <ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace before">
  285. <compile files="hello/HelloWorld.java hello/ThrowExceptionBefore.aj"/>
  286. <run class="hello.HelloWorld">
  287. <stderr>
  288. <line text="hello.HelloWorld.println(HelloWorld.java:14)"/>
  289. <line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
  290. <line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
  291. </stderr>
  292. </run>
  293. </ajc-test>
  294. <ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace before - binary">
  295. <compile inpath="helloworld.jar" files="hello/ThrowExceptionBefore.aj"/>
  296. <run class="hello.HelloWorld">
  297. <stderr>
  298. <line text="hello.HelloWorld.println(HelloWorld.java:14)"/>
  299. <line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
  300. <line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
  301. </stderr>
  302. </run>
  303. </ajc-test>
  304. <ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace after">
  305. <compile files="hello/HelloWorld.java hello/ThrowExceptionAfter.aj"/>
  306. <run class="hello.HelloWorld">
  307. <stderr>
  308. <line text="hello.HelloWorld.println(HelloWorld.java:15)"/>
  309. <line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
  310. <line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
  311. </stderr>
  312. </run>
  313. </ajc-test>
  314. <ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace around">
  315. <compile files="hello/HelloWorld.java hello/ThrowExceptionAround.aj" options="-XnoInline"/>
  316. <run class="hello.HelloWorld">
  317. <stderr>
  318. <line text="hello.HelloWorld.println(HelloWorld.java:13)"/>
  319. <line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
  320. <line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
  321. </stderr>
  322. </run>
  323. </ajc-test>
  324. <ajc-test dir="bugs153/pr149322" title="can't find type on interface call 1">
  325. <compile files="Interface.java"/>
  326. <compile
  327. files="Missing.java"
  328. outjar="missing.jar"
  329. />
  330. <compile files="TestWithMissing.java" classpath="missing.jar"/>
  331. <compile files="Aspect1.aj" options="-showWeaveInfo -inpath ." classpath="missing.jar">
  332. <message kind="weave" text="void Interface.interfaceMethod()"/>
  333. <message kind="weave" text="void Missing.interfaceMethod()"/>
  334. </compile>
  335. <compile files="Aspect1.aj" options="-Xlint:warning -showWeaveInfo -inpath .">
  336. <message kind="weave" text="void Interface.interfaceMethod()"/>
  337. <message kind="warning" text="can't determine superclass of missing type Missing"/>
  338. </compile>
  339. <run class="TestWithMissing">
  340. <stdout>
  341. <line text="Aspect1.before() interfaceMethod"/>
  342. <line text="Missing.interfaceMethod()"/>
  343. <!--
  344. <line text="Aspect1.before() interfaceMethod"/>
  345. -->
  346. <line text="Missing.interfaceMethod()"/>
  347. <line text="Missing.missingMethod()"/>
  348. </stdout>
  349. </run>
  350. </ajc-test>
  351. <ajc-test dir="bugs153/pr149322" title="can't find type on interface call 2">
  352. <compile files="Interface.java"/>
  353. <compile
  354. files="Missing.java"
  355. outjar="missing.jar"
  356. />
  357. <compile files="TestWithMissing.java" classpath="missing.jar"/>
  358. <compile files="Aspect2.aj" options="-showWeaveInfo -inpath ." classpath="missing.jar">
  359. <message kind="weave" text="void Interface.interfaceMethod()"/>
  360. <message kind="weave" text="void Missing.interfaceMethod()"/>
  361. </compile>
  362. <compile files="Aspect2.aj" options="-Xlint:warning -showWeaveInfo -inpath .">
  363. <message kind="weave" text="void Interface.interfaceMethod()"/>
  364. <message kind="warning" text="can't determine whether missing type Missing is an instance of Interface"/>
  365. <message kind="warning" text="can't determine superclass of missing type Missing"/>
  366. </compile>
  367. <run class="TestWithMissing">
  368. <stdout>
  369. <line text="Aspect2.before() interfaceMethod"/>
  370. <line text="Missing.interfaceMethod()"/>
  371. <!--
  372. <line text="Aspect2.before() interfaceMethod"/>
  373. -->
  374. <line text="Missing.interfaceMethod()"/>
  375. <line text="Missing.missingMethod()"/>
  376. </stdout>
  377. </run>
  378. </ajc-test>
  379. <ajc-test dir="bugs153/pr149322" title="can't find type on interface call 3">
  380. <compile files="Interface.java"/>
  381. <compile
  382. files="Missing.java"
  383. outjar="missing.jar"
  384. />
  385. <compile files="TestWithMissing.java" classpath="missing.jar"/>
  386. <compile files="Aspect3.aj" options="-showWeaveInfo -inpath ." classpath="missing.jar">
  387. <message kind="weave" text="void Interface.interfaceMethod()"/>
  388. <message kind="weave" text="void Missing.interfaceMethod()"/>
  389. </compile>
  390. <compile files="Aspect3.aj" options="-Xlint:warning -showWeaveInfo -inpath .">
  391. <message kind="weave" text="void Interface.interfaceMethod()"/>
  392. <message kind="warning" text="can't determine whether missing type Missing is an instance of Interface"/>
  393. <message kind="warning" text="can't determine superclass of missing type Missing"/>
  394. </compile>
  395. <run class="TestWithMissing">
  396. <stdout>
  397. <line text="Aspect3.before() interfaceMethod"/>
  398. <line text="Missing.interfaceMethod()"/>
  399. <!--
  400. <line text="Aspect3.before() interfaceMethod"/>
  401. -->
  402. <line text="Missing.interfaceMethod()"/>
  403. <line text="Missing.missingMethod()"/>
  404. </stdout>
  405. </run>
  406. </ajc-test>
  407. <ajc-test dir="bugs153" title="match volatile field">
  408. <compile files="pr150671.aj" options="-Xset:activateLightweightDelegates=false">
  409. <message kind="error" line="7" text="Changing state"/>
  410. <message kind="error" line="8" text="test"/>
  411. </compile>
  412. </ajc-test>
  413. <ajc-test dir="java5/ataspectj" title="Duplicate JVMTI agents">
  414. <compile files="HelloWorld.java"/>
  415. <compile files="MessageHandler.java"/>
  416. <!-- <compile files="Aspect.aj" options="-outxml"/> -->
  417. <compile files="Aspect.aj" options="-outxml -outjar aspects.jar"/>
  418. <ant file="ajc-ant.xml" target="Duplicate JVMTI agents" verbose="true"/>
  419. </ajc-test>
  420. <ajc-test dir="bugs153/pr151978" title="generics problem">
  421. <compile files="IMessage.java" options="-1.5">
  422. </compile>
  423. </ajc-test>
  424. <ajc-test dir="bugs153/pr152631" title="decp and cflowadder munger clash">
  425. <compile files="EMA.java" options="-1.5"/>
  426. </ajc-test>
  427. <ajc-test dir="bugs153/pr153572" title="LTWWorld with annotation matching">
  428. <compile
  429. files="Configurable.java, AnnotationMatcher.aj"
  430. options="-1.5"
  431. outjar="aspectlib.jar"
  432. outxmlfile="META-INF/aop.xml"/>
  433. <compile files="Configurable.java,Annotated.java,Main.java" options="-1.5" outjar="myapp.jar"/>
  434. <run class="Main" ltw="">
  435. <stdout>
  436. <line text="annotated type initialized"/>
  437. </stdout>
  438. </run>
  439. </ajc-test>
  440. <ajc-test dir="bugs153/pr149560" title="incorrect staticinitialization weaving - codestyle">
  441. <compile files="CodeStyle.java" options="-1.5 -showWeaveInfo">
  442. <message kind="weave" text="Join point 'staticinitialization(void MyAspect.&lt;clinit&gt;())' in Type 'MyAspect' (CodeStyle.java:3) advised by after advice from 'MyAspect' (CodeStyle.java:4)"/>
  443. <message kind="weave" test="Join point 'staticinitialization(void CodeStyle.&lt;clini&gt;())' in Type 'CodeStyle' (CodeStyle.java:9) advised by after advice from 'MyAspect' (CodeStyle.java:4)"/>
  444. </compile>
  445. <run class="CodeStyle">
  446. <stdout>
  447. <line text="after initialization staticinitialization(MyAspect.&lt;clinit&gt;)"/>
  448. <line text="after initialization staticinitialization(CodeStyle.&lt;clinit&gt;)"/>
  449. <line text="InstanceExists?true"/>
  450. </stdout>
  451. </run>
  452. </ajc-test>
  453. <ajc-test dir="bugs153/pr149560" title="incorrect staticinitialization weaving - annstyle">
  454. <compile files="AnnStyle.java" options="-1.5 -showWeaveInfo">
  455. <message kind="weave" text="Join point 'staticinitialization(void MyAspect.&lt;clinit&gt;())' in Type 'MyAspect' (AnnStyle.java:5) advised by after advice from 'MyAspect' (AnnStyle.java:7)"/>
  456. <message kind="weave" test="Join point 'staticinitialization(void AnnStyle.&lt;clini&gt;())' in Type 'AnnStyle' (AnnStyle.java:12) advised by after advice from 'MyAspect' (AnnStyle.java:7)"/>
  457. </compile>
  458. <run class="AnnStyle">
  459. <stdout>
  460. <line text="after initialization staticinitialization(MyAspect.&lt;clinit&gt;)"/>
  461. <line text="after initialization staticinitialization(AnnStyle.&lt;clinit&gt;)"/>
  462. <line text="InstanceExists?true"/>
  463. </stdout>
  464. </run>
  465. </ajc-test>
  466. <ajc-test dir="ltw" title="reweavableAspectNotRegistered error">
  467. <compile files="HelloWorld.java, ExceptionHandler.aj" options="-showWeaveInfo">
  468. <message kind="weave" text="Join point 'method-execution(void HelloWorld.main(java.lang.String[]))' in Type 'HelloWorld' (HelloWorld.java:3) advised by around advice from 'ExceptionHandler' (ExceptionHandler.aj:2)"/>
  469. </compile>
  470. <compile files="EmptyAspect.aj">
  471. </compile>
  472. <run class="HelloWorld" ltw="aop-missingaspect.xml">
  473. <stdout>
  474. <line text="Hello World!"/>
  475. </stdout>
  476. <stderr>
  477. <line text="error aspect 'ExceptionHandler' woven into 'HelloWorld' must be defined to the weaver (placed on the aspectpath, or defined in an aop.xml file if using LTW)."/>
  478. </stderr>
  479. </run>
  480. </ajc-test>
  481. <ajc-test dir="bugs153/pr155972" title="NPE in ConstructorSignatureImpl">
  482. <compile files="ConstructorTest.java, SignatureImplAspect.aj" options="-Xlint:ignore"/>
  483. <run class="ConstructorTest">
  484. <stdout>
  485. <line text="ConstructorTest"/>
  486. </stdout>
  487. </run>
  488. </ajc-test>
  489. <ajc-test dir="bugs153/pr155972" title="NPE in FieldSignatureImpl">
  490. <compile files="FieldTest.java, SignatureImplAspect.aj" options="-Xlint:ignore"/>
  491. <run class="FieldTest">
  492. <stdout>
  493. <line text="intField"/>
  494. </stdout>
  495. </run>
  496. </ajc-test>
  497. <ajc-test dir="bugs153/pr155972" title="NPE in InitializerSignatureImpl">
  498. <compile files="InitializerTest.java, SignatureImplAspect.aj" options="-Xlint:ignore"/>
  499. <run class="InitializerTest">
  500. <stdout>
  501. <line text="InitializerTest"/>
  502. </stdout>
  503. </run>
  504. </ajc-test>
  505. <ajc-test dir="bugs153/pr155763" title="ensure LineNumberTable correct with generics, for each and continue">
  506. <compile files="Test.java" options="-1.5">
  507. <message kind="warning" line="27" text="adviceDidNotMatch"/>
  508. </compile>
  509. </ajc-test>
  510. <ajc-test dir="bugs153/pr157474" title="TestServer with duplicate configuration" keywords="ltw,server">
  511. <compile files="AbstractTracing.aj" options="-outjar library.jar -outxml"/>
  512. <compile files="HelloWorld.java" options="-outjar application.jar"/>
  513. <ant file="ant-server.xml" target="TestServer with duplicate configuration" verbose="true">
  514. <stdout>
  515. <line text="Starting ..."/>
  516. <line text="Running HelloWorld"/>
  517. <line text="? main"/>
  518. <line text="Hello World!"/>
  519. <line text="Stopping ..."/>
  520. </stdout>
  521. </ant>
  522. </ajc-test>
  523. <ajc-test dir="bugs153/pr151772" title="ensure declare soft doesn't allow undeclared exception in anonymous inner class">
  524. <compile files="Softener.aj"/>
  525. </ajc-test>
  526. <ajc-test dir="bugs153/pr151772" title="ensure declare soft doesn't allow undeclared exception in anonymous inner class - 2">
  527. <compile files="Softener2.aj">
  528. <message kind="error" line="18" text="Unhandled exception type SQLException"/>
  529. </compile>
  530. </ajc-test>
  531. <ajc-test dir="bugs153/pr125981" title="declare soft and inner classes">
  532. <compile files="SampleTest.java"/>
  533. </ajc-test>
  534. <ajc-test dir="bugs153/pr156904/inSameFile" title="ensure no invalidAbsoluteTypeName when do match - 1">
  535. <compile files="A.aj"/>
  536. </ajc-test>
  537. <ajc-test dir="bugs153/pr156904/inDiffPkgAndImport" title="ensure no invalidAbsoluteTypeName when do match - 2">
  538. <compile files="A.aj,Outer.java"/>
  539. </ajc-test>
  540. <ajc-test dir="bugs153/pr156904/inSamePkg" title="ensure no invalidAbsoluteTypeName when do match - 3">
  541. <compile files="A.aj,Outer.java"/>
  542. </ajc-test>
  543. <ajc-test dir="bugs153/pr156904/inDiffPkgWithoutImport" title="ensure no invalidAbsoluteTypeName when do match - 4">
  544. <compile files="A.aj,Outer.java">
  545. <message kind="warning" line="5" text="no match for this type name: Outer [Xlint:invalidAbsoluteTypeName]"/>
  546. </compile>
  547. </ajc-test>
  548. <ajc-test dir="ltw" title="NPE with custom agent" keywords="ltw">
  549. <compile files="java/net/URLClassLoader.java"/>
  550. <compile files="HelloWorld.java" options="-outjar hello.jar"/>
  551. <compile files="ExceptionHandler.aj" options="-outxml -outjar handler.jar"/>
  552. <compile files="NullSecurityManager.java" options="-outjar security.jar"/>
  553. <ant file="ant.xml" target="NPE with custom agent" verbose="true">
  554. <stdout>
  555. <line text="Hello World!"/>
  556. </stdout>
  557. </ant>
  558. </ajc-test>
  559. <ajc-test dir="bugs153/pr158957" title="NPE with LTW, pointcut library and missing aspect dependency" keywords="ltw">
  560. <compile files="HelloWorld.java" options="-outjar hello.jar"/>
  561. <compile files="Missing.java" options="-outjar missing.jar"/>
  562. <compile files="Tracing.aj, PointcutLibrary.aj" options="-Xlint:ignore -1.5 -outxml -outjar tracing.jar" classpath="hello.jar,missing.jar"/>
  563. <!--
  564. <run class="HelloWorld" ltw="aop.xml">
  565. <stdout>
  566. <line text="? main"/>
  567. <line text="Hello World!"/>
  568. </stdout>
  569. </run>
  570. -->
  571. <ant file="ant.xml" target="NPE with LTW, pointcut library and missing aspect dependency" verbose="true">
  572. <stdout>
  573. <line text="? main"/>
  574. <line text="Hello World!"/>
  575. </stdout>
  576. </ant>
  577. </ajc-test>
  578. <ajc-test dir="bugs153/pr132080"
  579. title="Weave concrete sub-aspect with advice"
  580. keywords="aop.xml">
  581. <compile
  582. files="HelloWorld.java"
  583. >
  584. </compile>
  585. <compile files="AbstractSuperAspect.aj"/>
  586. <compile files="TestAdvice.aj"/>
  587. <run class="HelloWorld" ltw="aop-advice.xml">
  588. <stdout>
  589. <line text="? ConcreteAspectWithAdvice()"/>
  590. <line text="? void HelloWorld.main(String[])"/>
  591. <line text="? HelloWorld()"/>
  592. <line text="Hello World!"/>
  593. </stdout>
  594. </run>
  595. </ajc-test>
  596. <ajc-test dir="bugs153/pr132080"
  597. title="Weave concrete sub-aspect with ITD"
  598. keywords="aop.xml">
  599. <!--
  600. <compile files="AbstractSuperAspectWithInterface.aj, TestInterface.java" options="-verbose"/>
  601. <compile files="HelloWorld.java, TestITD.aj, ConcreteAspectWithITD.aj" options="-verbose">
  602. <message line="3" kind="warning" text="this affected type is not exposed to the weaver: AbstractSuperAspectWithInterface"/>
  603. </compile>
  604. <run class="HelloWorld">
  605. <stdout>
  606. <line text="? void TestITD.interfaceMethod()"/>
  607. <line text="? void HelloWorld.main(String[])"/>
  608. <line text="Hello World!"/>
  609. </stdout>
  610. </run>
  611. -->
  612. <compile files="HelloWorld.java"/>
  613. <compile files="AbstractSuperAspectWithInterface.aj, TestInterface.java"/>
  614. <compile files="TestITD.aj">
  615. <message line="3" kind="warning" text="this affected type is not exposed to the weaver: AbstractSuperAspectWithInterface"/>
  616. </compile>
  617. <run class="HelloWorld" ltw="aop-itd.xml">
  618. <stdout>
  619. <line text="? void TestITD.interfaceMethod()"/>
  620. <line text="? void HelloWorld.main(String[])"/>
  621. <line text="Hello World!"/>
  622. </stdout>
  623. </run>
  624. </ajc-test>
  625. <ajc-test dir="bugs153/pr132080" title="Weave concrete sub-aspect with around closure"
  626. keywords="aop.xml">
  627. <compile files="HelloWorld.java"/>
  628. <compile files="AbstractSuperAspect.aj"/>
  629. <compile files="TestAroundClosure.aj"/>
  630. <run class="HelloWorld" ltw="aop-aroundclosure.xml">
  631. <stdout>
  632. <line text="&rt; ConcreteAspectWithAroundClosure()"/>
  633. <line text="&lt; ConcreteAspectWithAroundClosure()"/>
  634. <line text="? void HelloWorld.main(String[])"/>
  635. <line text="&rt; HelloWorld()"/>
  636. <line text="&lt; HelloWorld()"/>
  637. <line text="Hello World!"/>
  638. </stdout>
  639. </run>
  640. </ajc-test>
  641. <ajc-test dir="bugs153/pr149096" title="Weave concrete sub-aspect with cflow">
  642. <compile files="SimpleTracing.aj" outjar="out.jar"/>
  643. <compile files="TestMain.aj"/>
  644. <run class="TestMain" ltw="aop-pr149096.xml"/>
  645. </ajc-test>
  646. <ajc-test dir="bugs153/pr158957" title="NPE with LTW, pointcut library and missing aspect dependency" keywords="ltw">
  647. <compile files="HelloWorld.java" options="-outjar hello.jar"/>
  648. <compile files="Missing.java" options="-outjar missing.jar"/>
  649. <compile files="Tracing.aj, PointcutLibrary.aj" options="-Xlint:ignore -1.5 -outxml -outjar tracing.jar" classpath="hello.jar,missing.jar"/>
  650. <!--
  651. <run class="HelloWorld" ltw="aop.xml">
  652. <stdout>
  653. <line text="? main"/>
  654. <line text="Hello World!"/>
  655. </stdout>
  656. </run>
  657. -->
  658. <ant file="ant.xml" target="NPE with LTW, pointcut library and missing aspect dependency" verbose="true">
  659. <stdout>
  660. <line text="? println"/>
  661. <line text="Hello World!"/>
  662. </stdout>
  663. </ant>
  664. </ajc-test>
  665. </suite>