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 39KB

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