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.

ajc153.xml 34KB

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