Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

ajc152.xml 34KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <!-- AspectJ v1.5.2 Tests -->
  3. <suite>
  4. <ajc-test dir="bugs152/pr135001" title="aspect libraries and asm">
  5. <compile files="AbstractAspect.java" outjar="lib.jar" options="-1.5"/>
  6. <compile files="Foo.java,ConcreteAspect.java" classpath="lib.jar" options="-1.5 -showWeaveInfo">
  7. <message kind="weave" text="Join point 'method-call(void Foo.foo())' in Type 'Foo' (Foo.java:3) advised by around advice from 'ConcreteAspect' (AbstractAspect.java:5)"/>
  8. </compile>
  9. <run class="Foo">
  10. <stderr>
  11. <line text="In the advice!"/>
  12. </stderr>
  13. </run>
  14. </ajc-test>
  15. <ajc-test dir="bugs152/pr122253" title="aspects14 - persingleton">
  16. <compile files="Singleton.java"/>
  17. <run class="Singleton">
  18. <stderr>
  19. <line text="hasAspect? true : true"/>
  20. <line text="aspectOf? SingletonInstance : SingletonInstance"/>
  21. <line text="hasAspect? true : true"/>
  22. <line text="aspectOf? SingletonInstance : SingletonInstance"/>
  23. </stderr>
  24. </run>
  25. </ajc-test>
  26. <ajc-test dir="bugs152/pr122253" title="aspects14 - percflow">
  27. <compile files="PerCflow.java"/>
  28. <run class="PerCflow">
  29. <stderr>
  30. <line text="before"/>
  31. <line text="hasAspect? false : false"/>
  32. <line text="aspectOf? null : null"/>
  33. <line text="during"/>
  34. <line text="hasAspect? true : true"/>
  35. <line text="aspectOf? PerCflowInstance : PerCflowInstance"/>
  36. <line text="after"/>
  37. <line text="hasAspect? false : false"/>
  38. <line text="aspectOf? null : null"/>
  39. </stderr>
  40. </run>
  41. </ajc-test>
  42. <ajc-test dir="bugs152/pr122253" title="aspects14 - perthis">
  43. <compile files="PerThis.java"/>
  44. <run class="PerThis">
  45. <stderr>
  46. <line text="before"/>
  47. <line text="hasAspect? false : false"/>
  48. <line text="aspectOf? null : null"/>
  49. <line text="during"/>
  50. <line text="hasAspect? true : true"/>
  51. <line text="aspectOf? PerThisInstance : PerThisInstance"/>
  52. <line text="after"/>
  53. <line text="hasAspect? false : false"/>
  54. <line text="aspectOf? null : null"/>
  55. </stderr>
  56. </run>
  57. </ajc-test>
  58. <ajc-test dir="bugs152/pr122253" title="aspects14 - pertypewithin">
  59. <compile files="PerTypeWithin.java"/>
  60. <run class="PerTypeWithin">
  61. <stderr>
  62. <line text="before"/>
  63. <line text="hasAspect? false : false"/>
  64. <line text="aspectOf? null : null"/>
  65. <line text="during"/>
  66. <line text="hasAspect? true : true"/>
  67. <line text="aspectOf? PerTypeWithinInstance : PerTypeWithinInstance"/>
  68. <line text="after"/>
  69. <line text="hasAspect? false : false"/>
  70. <line text="aspectOf? null : null"/>
  71. </stderr>
  72. </run>
  73. </ajc-test>
  74. <ajc-test dir="bugs152/pr148536" title="NPE for unknown annotation">
  75. <compile files="Bug.java" options="-1.5">
  76. <message kind="error" line="2" text="SomeAnnotation cannot be resolved to a type"/>
  77. </compile>
  78. </ajc-test>
  79. <ajc-test dir="bugs152/pr148537" title="classcast annotation value">
  80. <compile files="MyClass.java,MyAspect.java" options="-1.5"/>
  81. </ajc-test>
  82. <ajc-test dir="bugs152/pr148545" title="nosuchmethoderror for privileged aspect">
  83. <compile files="MyClass.java,MyAspect.java,MyAnnotation.java,MyEnum.java" options="-1.5"/>
  84. <run class="MyClass"/>
  85. </ajc-test>
  86. <ajc-test dir="bugs152/pr148545" title="nosuchmethoderror for privileged aspect - 2">
  87. <compile files="MyClass.java,MyAspect2.java,MyAnnotation.java,MyEnum.java" options="-1.5 -showWeaveInfo">
  88. <message kind="weave" text="Join point 'method-execution(void MyClass.test())' in Type 'MyClass' (MyClass.java:8) advised by around advice from 'MyAspect2' (MyAspect2.java:5)"/>
  89. </compile>
  90. <run class="MyClass"/>
  91. </ajc-test>
  92. <ajc-test dir="bugs152/pr126355" title="bizarre generic error with itds">
  93. <compile files="Pair.java" options="-1.5"/>
  94. <compile files="Test.java" options="-1.5"/>
  95. </ajc-test>
  96. <ajc-test dir="bugs152/pr126355" title="bizarre generic error with itds - 2">
  97. <compile files="Pair.java" options="-1.5"/>
  98. <compile files="Test.java" options="-1.5"/>
  99. </ajc-test>
  100. <ajc-test dir="bugs152/pr145950" title="fails to discover Serializable">
  101. <compile files="Indirect.java" options="-1.5 -XaddSerialVersionUID"/>
  102. <run class="Indirect">
  103. <stderr>
  104. <line text="SerialVersionUID is "/>
  105. </stderr>
  106. </run>
  107. </ajc-test>
  108. <ajc-test dir="bugs152/pr132349" title="ITD on inner type of generic type">
  109. <compile files="TopLevelType.java" options="-1.5"/>
  110. <run class="TopLevelType"/>
  111. </ajc-test>
  112. <ajc-test dir="bugs152/pr144602" title="atAJ perthis aspect verification error">
  113. <compile files="MyAspect.aj" options="-1.5"/>
  114. <run class="MyAspect"/>
  115. </ajc-test>
  116. <ajc-test dir="bugs152/pr132349" title="ITD on inner type of generic type - 2">
  117. <compile files="TopLevelType2.java" options="-1.5">
  118. <message kind="error" line="12"/> <!-- error message is currently crap - its a parser message -->
  119. </compile>
  120. </ajc-test>
  121. <ajc-test dir="bugs152/pr132349" title="ITD on inner type of generic type - 3">
  122. <compile files="TopLevelType3.java" options="-1.5">
  123. <message kind="error" line="12" text="Cannot make inter-type declarations on parameterized types"/>
  124. <message kind="error" line="7" text="The method someMethod() is undefined for the type TopLevelType3.NestedType"/>
  125. </compile>
  126. </ajc-test>
  127. <ajc-test dir="bugs152/pr135865" title="misbehaving declare annotation">
  128. <compile files="B.java,A.java" options="-1.5 -Xlint:ignore">
  129. <!--message kind="weave" text="Join point 'method-call(void B.foo())' in Type 'A' (A.java:32) advised by before advice from 'Aspect' (A.java:22) [with runtime test]"/>
  130. <message kind="weave" text="Join point 'method-call(void A.foo())' in Type 'A' (A.java:33) advised by before advice from 'Aspect' (A.java:22) [with runtime test]"/>
  131. <message kind="weave" text="' void B.goo()' (A.java:7) is annotated with @Ann method annotation from 'Aspect' (A.java:27)"/-->
  132. </compile>
  133. <run class="A">
  134. <stdout>
  135. <line text="Join point: call(void B.foo())"/>
  136. </stdout>
  137. </run>
  138. </ajc-test>
  139. <ajc-test dir="bugs152/pr135865" title="misbehaving declare annotation - 2">
  140. <compile files="A.java,B.java" options="-1.5 -Xlint:ignore">
  141. <!--message kind="weave" text="Join point 'method-call(void B.foo())' in Type 'A' (A.java:32) advised by before advice from 'Aspect' (A.java:22) [with runtime test]"/>
  142. <message kind="weave" text="Join point 'method-call(void A.foo())' in Type 'A' (A.java:33) advised by before advice from 'Aspect' (A.java:22) [with runtime test]"/>
  143. <message kind="weave" text="' void B.goo()' (A.java:7) is annotated with @Ann method annotation from 'Aspect' (A.java:27)"/-->
  144. </compile>
  145. <run class="A">
  146. <stdout>
  147. <line text="Join point: call(void B.foo())"/>
  148. </stdout>
  149. </run>
  150. </ajc-test>
  151. <ajc-test dir="bugs152/pr129704" title="annotations and generics leading to BCException">
  152. <compile files="A.java" options="-1.5"/>
  153. <run class="A">
  154. <stderr>
  155. <line text="@Marker()"/>
  156. </stderr>
  157. </run>
  158. </ajc-test>
  159. <ajc-test dir="bugs152/pr136026" title="verifyerror">
  160. <compile files="CflowOrder.java" options="-1.5"/>
  161. <run class="CflowOrder"/>
  162. </ajc-test>
  163. <ajc-test dir="bugs152/pr136026" title="verifyerror - 2">
  164. <compile files="CflowOrderOriginal.java" options="-1.5"/>
  165. <run class="bugs.CflowOrderOriginal">
  166. <stderr>
  167. <line text="Starting CflowOrder.main(..)"/>
  168. <line text="topAnnotated"/>
  169. <!--line text=" Join point: call(void bugs.CflowOrderOriginal.A.foo())"/>
  170. <line text=" Enclosing join point: execution(void bugs.CflowOrderOriginal.A.main(String[]))"/>
  171. <line text=" Annotation: @bugs.CflowOrderOriginal$Annotation(value=A.foo)"/-->
  172. <line text="nonTopAnnotated"/>
  173. <!--line text=" Join point: call(void bugs.CflowOrderOriginal.B.foo())"/>
  174. <line text=" Enclosing join point: execution(void bugs.CflowOrderOriginal.A.foo())"/>
  175. <line text=" Annotation: @bugs.CflowOrderOriginal$Annotation(value=B.foo)"/-->
  176. <line text="B.foo()"/>
  177. <line text="A.foo()"/>
  178. <line text="A.main(..)"/>
  179. <line text="Ending CflowOrder.main(..)"/>
  180. </stderr>
  181. </run>
  182. </ajc-test>
  183. <ajc-test dir="bugs152/pr136258" title="stack overflow">
  184. <compile files="StatisticsTypeImpl.java" options="-1.5"/>
  185. <run class="StatisticsTypeImpl"/>
  186. </ajc-test>
  187. <ajc-test dir="bugs152/pr138384" title="method too big">
  188. <compile files="BigMethod.java" options="-1.5"> <!-- will be 67628 bytes in the big method -->
  189. <message kind="error" line="1" text="problem generating method BigMethod.i_am_a_big_method : Code size too big: 67629"/>
  190. </compile>
  191. <!--run class="BigMethod"/-->
  192. </ajc-test>
  193. <ajc-test dir="bugs152/pr138798" title="atWithinCodeBug">
  194. <compile files="ErrorHandling.aj" options="-1.5"/>
  195. <run class="ErrorHandling">
  196. <stderr>
  197. <line text="Caught in foo"/>
  198. </stderr>
  199. </run>
  200. </ajc-test>
  201. <ajc-test dir="bugs152/pr138158" title="not at withincode - 1">
  202. <compile files="Boo.java" options="-1.5 -showWeaveInfo">
  203. <message kind="weave" text="Join point 'method-call(void Boo.m())' in Type 'Boo' (Boo.java:9) advised by before advice from 'X' (Boo.java:19)"/>
  204. </compile>
  205. <run class="Boo"/>
  206. </ajc-test>
  207. <ajc-test dir="bugs152/pr138158" title="not at within - 3">
  208. <compile files="Doo.java" options="-1.5 -showWeaveInfo">
  209. <message kind="weave" text="Join point 'method-call(void java.io.PrintStream.println(java.lang.String))' in Type 'Soo' (Doo.java:20) advised by before advice from 'X' (Doo.java:25)"/>
  210. </compile>
  211. <run class="Doo"/>
  212. </ajc-test>
  213. <ajc-test dir="bugs152/pr138158" title="not at withincode - 2">
  214. <compile files="Foo.java" options="-1.5 -showWeaveInfo">
  215. <message kind="weave" text="Join point 'method-call(void java.io.PrintStream.println(java.lang.String))' in Type 'Foo' (Foo.java:14) advised by before advice from 'X' (Foo.java:26)"/>
  216. <message kind="weave" text="Join point 'method-call(void java.io.PrintStream.println(java.lang.String))' in Type 'Foo' (Foo.java:18) advised by before advice from 'X' (Foo.java:23)"/>
  217. </compile>
  218. <run class="Foo"/>
  219. </ajc-test>
  220. <ajc-test dir="bugs152/pr137568" title="complicated generics declaration">
  221. <compile files="C.java" options="-emacssym -1.5"/>
  222. <run class="C"/>
  223. </ajc-test>
  224. <ajc-test dir="bugs152/pr138143" title="npe on duplicate method with ataj">
  225. <compile files="AspectClass.java" options="-1.5">
  226. <message kind="error" line="7" text="Duplicate method incomingMessage() in type AspectClass"/>
  227. <message kind="error" line="12" text="Duplicate method incomingMessage() in type AspectClass"/>
  228. <!-- in e37 the TypeDeclaration.traverse(ASTVisitor,CompilationUnitScope) no longer checks 'ignoreFurtherInvestigation' so gets further -->
  229. <message kind="warning" line="11" text="no match for this type name: Incoming [Xlint:invalidAbsoluteTypeName]"/>
  230. </compile>
  231. </ajc-test>
  232. <ajc-test dir="bugs152/pr137496" title="pointcuts and generics - B">
  233. <compile files="B.java" options="-1.5 -showWeaveInfo">
  234. <!--message kind="weave" text="Join point 'method-call(java.lang.String C.pm(java.lang.String))' in Type 'B' (B.java:20) advised by before advice from 'X' (B.java:26)"/-->
  235. <message kind="weave" text="Join point 'method-call(java.lang.Object C.pm(java.lang.Object))' in Type 'B' (B.java:20) advised by before advice from 'X' (B.java:26)"/>
  236. <!--message kind="weave" text="Join point 'method-call(java.lang.String C.pm2(java.lang.String))' in Type 'B' (B.java:21) advised by before advice from 'X' (B.java:27)"/-->
  237. </compile>
  238. <run class="B">
  239. <stderr>
  240. <line text="advice"/>
  241. <line text="foo"/>
  242. </stderr>
  243. </run>
  244. </ajc-test>
  245. <ajc-test dir="bugs152/pr137496" title="pointcuts and generics - D">
  246. <compile files="D.java" options="-1.5 -showWeaveInfo">
  247. <message kind="weave" text="Join point 'method-call(java.lang.String CImpl.pm(java.lang.String))' in Type 'D' (D.java:20) advised by before advice from 'X' (D.java:26)"/>
  248. <message kind="weave" text="Join point 'method-call(java.lang.String CImpl.pm2(java.lang.String))' in Type 'D' (D.java:21) advised by before advice from 'X' (D.java:27)"/>
  249. </compile>
  250. <run class="D">
  251. <stderr>
  252. <line text="advice"/>
  253. <line text="foo"/>
  254. <line text="advice2"/>
  255. <line text="foo"/>
  256. </stderr>
  257. </run>
  258. </ajc-test>
  259. <ajc-test dir="bugs152/pr137496" title="pointcuts and generics - E">
  260. <compile files="E.java" options="-1.5 -showWeaveInfo">
  261. <message kind="weave" text="Join point 'method-call(java.lang.Object C.pm(java.lang.Object))' in Type 'E' (E.java:18) advised by before advice from 'X' (E.java:23)"/>
  262. </compile>
  263. <run class="E">
  264. <stderr>
  265. <line text="advice"/>
  266. <line text="foo"/>
  267. </stderr>
  268. </run>
  269. </ajc-test>
  270. <ajc-test dir="bugs152/pr137496" title="pointcuts and generics - F">
  271. <compile files="F.java" options="-1.5 -showWeaveInfo">
  272. <message kind="weave" text="Join point 'method-call(java.lang.Object C.pm(java.lang.Object))' in Type 'F' (F.java:18) advised by before advice from 'X' (F.java:23)"/>
  273. </compile>
  274. <run class="F">
  275. <stderr>
  276. <line text="advice"/>
  277. <line text="foo"/>
  278. </stderr>
  279. </run>
  280. </ajc-test>
  281. <ajc-test dir="bugs152/pr137496" title="pointcuts and generics - G">
  282. <compile files="G.java" options="-1.5 -showWeaveInfo">
  283. <message kind="warning" line="23" text="advice defined in X has not been applied [Xlint:adviceDidNotMatch]"/>
  284. </compile>
  285. <run class="G">
  286. <stderr>
  287. <line text="foo"/>
  288. </stderr>
  289. </run>
  290. </ajc-test>
  291. <ajc-test dir="bugs152/pr137496" title="pointcuts and generics - H">
  292. <compile files="H.java" options="-1.5 -showWeaveInfo">
  293. <message kind="weave" text="Join point 'method-call(java.lang.Object C.pm(java.lang.Object))' in Type 'H' (H.java:20) advised by around advice from 'X' (H.java:26)"/>
  294. </compile>
  295. <run class="H">
  296. <stderr>
  297. <line text="advice"/>
  298. </stderr>
  299. </run>
  300. </ajc-test>
  301. <ajc-test dir="bugs152/binaryDecp" title="incorrect overrides evaluation - 1.3">
  302. <compile files="SubClassLoader.java,SubSubClassLoader.java" options="-1.3" outjar="lib.jar"/>
  303. <compile files="X.aj" inpath="lib.jar" options="-showWeaveInfo">
  304. <message kind="weave" text="Setting superclass of type 'SubSubClassLoader' (SubSubClassLoader.java) to 'SubClassLoader' (X.aj)"/>
  305. </compile>
  306. </ajc-test>
  307. <ajc-test dir="bugs152/binaryDecp" title="incorrect overrides evaluation - 1.4">
  308. <compile files="IsItSynthetic.java" options="-1.5"/>
  309. <compile files="Top.java" options="-source 1.5 -target 1.5" outjar="a.jar"/>
  310. <compile files="Bottom.java" classpath="$sandbox/a.jar" options="-source 1.4 -target 1.4" outjar="b.jar"/>
  311. <compile files="Middle.java" classpath="$sandbox/a.jar" options="-source 1.4 -target 1.4" outjar="c.jar"/>
  312. <compile files="X2.aj" classpath="$sandbox/a.jar,$sandbox/b.jar,$sandbox/c.jar" options="-Xlint:ignore" outjar="x.jar"/>
  313. <run class="Bottom" classpath="a.jar,b.jar,c.jar,x.jar" ltw="aop.xml"/>
  314. <!--message kind="weave" text="Setting superclass of type 'Bottom' (Bottom.java) to 'Middle' (X2.aj)"/-->
  315. </ajc-test>
  316. <ajc-test dir="bugs152/binaryDecp" title="incorrect overrides evaluation - 1.5">
  317. <compile files="SubClassLoader.java,SubSubClassLoader.java" options="-1.5" outjar="lib.jar"/>
  318. <compile files="X.aj" inpath="lib.jar" options="-showWeaveInfo">
  319. <message kind="weave" text="Setting superclass of type 'SubSubClassLoader' (SubSubClassLoader.java) to 'SubClassLoader' (X.aj)"/>
  320. </compile>
  321. </ajc-test>
  322. <ajc-test dir="bugs152/pr129282" title="no unnecessary declaration of thrown exception warning - 1">
  323. <compile files="MethodExecution.aj" options="-warn:+unusedThrown">
  324. <message kind="warning" line="30" text="The declared exception SQLException is not actually thrown by the method needsToThrow() from type C"/>
  325. </compile>
  326. </ajc-test>
  327. <ajc-test dir="bugs152/pr129282" title="no unnecessary declaration of thrown exception warning - 2">
  328. <compile files="MethodCall.aj" options="-warn:+unusedThrown">
  329. <message kind="warning" line="36" text="The declared exception FileNotFoundException is not actually thrown by the method m4() from type C1"/>
  330. </compile>
  331. </ajc-test>
  332. <ajc-test dir="bugs152/pr129282" title="no unnecessary declaration of thrown exception warning - 3">
  333. <compile files="InnerMethodCall.aj" options="-warn:+unusedThrown">
  334. <message kind="warning" line="44" text="The declared exception FileNotFoundException is not actually thrown by the method m4() from type C1"/>
  335. </compile>
  336. </ajc-test>
  337. <ajc-test dir="bugs152/pr129282" title="no unnecessary declaration of thrown exception warning - 4">
  338. <compile files="AdviceExecution.aj" options="-1.5 -warn:+unusedThrown"/>
  339. </ajc-test>
  340. <ajc-test dir="bugs152/pr129282" title="no unnecessary declaration of thrown exception warning - 5">
  341. <compile files="ExceptionHandler.aj" options="-warn:+unusedThrown">
  342. <message kind="warning" line="34" text="The declared exception MyException is not actually thrown by the method throwingMethod2() from type C"/>
  343. </compile>
  344. </ajc-test>
  345. <ajc-test dir="bugs152/pr129282" title="no unnecessary declaration of thrown exception warning - 6">
  346. <compile files="Initialization.aj" options="-warn:+unusedThrown"/>
  347. </ajc-test>
  348. <ajc-test dir="bugs152/pr129282" title="no unnecessary declaration of thrown exception warning - 7">
  349. <compile files="ConstructorCall.aj" options="-warn:+unusedThrown"/>
  350. </ajc-test>
  351. <ajc-test dir="bugs152/pr129282" title="no unnecessary declaration of thrown exception warning - 8">
  352. <compile files="ConstructorExecution.aj" options="-warn:+unusedThrown"/>
  353. </ajc-test>
  354. <ajc-test dir="bugs152/pr129282" title="no unnecessary declaration of thrown exception warning - 9">
  355. <compile files="MethodCallInDiffClass.aj" options="-warn:+unusedThrown"/>
  356. </ajc-test>
  357. <ajc-test dir="bugs152/pr129282" title="no unnecessary declaration of thrown exception warning - 10">
  358. <compile files="InnerMethodCall2.aj" options="-warn:+unusedThrown"/>
  359. </ajc-test>
  360. <ajc-test dir="bugs152/pr138215" pr="138215" title="Reference pointcut fails inside @DeclareWarning">
  361. <compile files="pr138215.aj" options="-1.5">
  362. <message kind="warning" line="17" text="no foos please"/>
  363. </compile>
  364. </ajc-test>
  365. <ajc-test dir="bugs152/pr138219" pr="138219" title="Can't use a FQ Reference pointcut in any pointcut expression referenced by a per-clause">
  366. <compile files="PerThisWithReference.aj,SomeOtherType.aj,RegularPCWithReference.aj" options="-1.5">
  367. </compile>
  368. <run class="PerThisWithReference">
  369. <stdout>
  370. <line text="before PerThisWithReference:1"/>
  371. <line text="before PerThisWithReference:2"/>
  372. </stdout>
  373. </run>
  374. </ajc-test>
  375. <ajc-test dir="bugs152/pr130722" pr="130722" title="FQ Reference pointcut from perclause ref pc">
  376. <compile files="test/Test.java,test/PointcutConsumer.aj,test1/PointcutProvider.aj"/>
  377. </ajc-test>
  378. <ajc-test dir="bugs152/pr138220" pr="138220" title="@Aspect with reference pointcut in perclause">
  379. <compile files="AtAspectWithPerClause.aj" options="-1.5">
  380. </compile>
  381. </ajc-test>
  382. <ajc-test dir="bugs152/pr144465" title="ltw with serialversionUID creation">
  383. <compile files="BigHorribleClass.java"/>
  384. <compile files="AnAspect.java" options="-1.4"/>
  385. <run class="BigHorribleClass" ltw="aop1.xml">
  386. <stderr>
  387. <line text="weaveinfo Join point 'staticinitialization(void BigHorribleClass.&lt;clinit&gt;())'"/>
  388. <line text="SerialVersionUID is "/>
  389. </stderr>
  390. </run>
  391. </ajc-test>
  392. <ajc-test dir="bugs152/pr125480" title="aop.xml aspect inheriting abstract method ">
  393. <compile files="HelloWorld.java"/>
  394. <compile files="AbstractMethods.aj, ConcreteMethods.aj" options="-1.5"/>
  395. <run class="HelloWorld" ltw="aop-tracing.xml">
  396. <stdout>
  397. <line text="advice running"/>
  398. <line text="Hello World!"/>
  399. </stdout>
  400. </run>
  401. </ajc-test>
  402. <ajc-test dir="bugs152/pr125480/case2" title="aop.xml aspect inheriting abstract method - code style">
  403. <compile files="HelloWorld.java"/>
  404. <compile files="AbstractMethods.aj, ConcreteMethods.aj" options="-1.5"/>
  405. <run class="HelloWorld" ltw="aop-tracing.xml">
  406. <stdout>
  407. <line text="advice running"/>
  408. <line text="Hello World!"/>
  409. </stdout>
  410. </run>
  411. </ajc-test>
  412. <ajc-test dir="bugs152/pr142466" title="aop.xml aspect inheriting but not concretizing abstract method">
  413. <compile files="HelloWorld.java"/>
  414. <compile files="AbstractMethods.aj, ConcreteMethods.aj" options="-1.5"/>
  415. <run class="HelloWorld" ltw="aop-tracing.xml">
  416. <stderr>
  417. <line text="error Abstract method 'void ConcreteMethods.foo(int)' cannot be concretized in XML:"/>
  418. <line text="error Concrete-aspect 'TraceHelloWorld' could not be registered"/>
  419. <line text="warning failure(s) registering aspects. Disabling weaver for class loader"/>
  420. </stderr>
  421. <stdout>
  422. <line text="Hello World!"/>
  423. </stdout>
  424. </run>
  425. </ajc-test>
  426. <ajc-test dir="bugs152/pr142466/case2" title="aop.xml aspect inheriting but not concretizing abstract method - 2">
  427. <compile files="HelloWorld.java"/>
  428. <compile files="AbstractMethods.aj, ConcreteMethods.aj" options="-1.5"/>
  429. <run class="HelloWorld" ltw="aop-tracing.xml">
  430. <stderr>
  431. <line text="error Abstract method 'void AbstractMethods.test()' cannot be concretized in XML"/>
  432. <line text="error Concrete-aspect 'TraceHelloWorld' could not be registered"/>
  433. <line text="warning failure(s) registering aspects. Disabling weaver for class loader"/>
  434. </stderr>
  435. <stdout>
  436. <line text="Hello World!"/>
  437. </stdout>
  438. </run>
  439. </ajc-test>
  440. <ajc-test dir="bugs152/pr138223" pr="138223" title="Double at annotation matching (no binding)">
  441. <compile files="DoubleAnnotationMatching.aj" options="-1.5">
  442. </compile>
  443. <run class="DoubleAnnotationMatching">
  444. <stderr>
  445. <line text="advice running at execution(void Foo.a())"/>
  446. <line text="advice running at execution(void TxTrueFoo.a())"/>
  447. <line text="advice running at execution(void TxTrueFoo.b())"/>
  448. <line text="advice running at execution(void TxTrueFoo.c())"/>
  449. <line text="advice running at execution(void TxFalseFoo.a())"/>
  450. </stderr>
  451. </run>
  452. </ajc-test>
  453. <ajc-test dir="bugs152/pr138286" pr="138286" title="No ClassCastException with perThis">
  454. <compile files="A.aj" options="-1.5 -showWeaveInfo">
  455. <message kind="weave" text="Join point 'initialization(void A.&lt;init&gt;())' in Type 'A' (A.aj:9) advised by before advice from 'A' (A.aj:13) [with runtime test]"/>
  456. <message kind="weave" text="Join point 'initialization(void Soo.&lt;init&gt;())' in Type 'Soo' (A.aj:31) advised by before advice from 'A' (A.aj:13) [with runtime test]"/>
  457. <message kind="weave" text="Join point 'initialization(void Goo.&lt;init&gt;())' in Type 'Goo' (A.aj:27) advised by before advice from 'A' (A.aj:13) [with runtime test]"/>
  458. <message kind="weave" text="Join point 'initialization(void Foo.&lt;init&gt;())' in Type 'Foo' (A.aj:25) advised by before advice from 'A' (A.aj:13) [with runtime test]"/>
  459. <message kind="weave" text="Join point 'initialization(void Boo.&lt;init&gt;())' in Type 'Boo' (A.aj:29) advised by before advice from 'A' (A.aj:13) [with runtime test]"/>
  460. </compile>
  461. <run class="A">
  462. <stderr>
  463. <line text="class Foo"/>
  464. <line text="class Boo"/>
  465. <line text="class Boo"/> <!-- this one is because of the super() call in Soo's default ctor -->
  466. <line text="class Soo"/>
  467. </stderr>
  468. </run>
  469. </ajc-test>
  470. <ajc-test dir="bugs152/pr139749" pr="139749" title="Super calls in @AspectJ advice">
  471. <compile files="AroundAdvicePassingPjpAsArgToSuper.java" options="-1.5">
  472. </compile>
  473. <run class="a.b.c.AroundAdvicePassingPjpAsArgToSuper"/>
  474. </ajc-test>
  475. <ajc-test dir="bugs152/pr137235" pr="137235"
  476. title="directory with .jar extension: source and outjar">
  477. <compile files="directory.jar/Hello.java" outjar="directory.jar/run.custom"/>
  478. <run class="Hello" classpath="$sandbox/directory.jar/run.custom">
  479. <stdout>
  480. <line text="Hello Java"/>
  481. </stdout>
  482. </run>
  483. </ajc-test>
  484. <ajc-test dir="bugs152/pr137235" pr="137235"
  485. title="directory with .jar extension" >
  486. <compile files="directory.jar/Before.java" outjar="directory.jar/inOne.custom" options="-1.4"/>
  487. <compile files="directory.jar/BeforeExec.aj" outjar="directory.jar/inTwo" options="-1.4"/>
  488. <compile files="directory.jar/Rename.aj" outjar="directory.jar/weave.jar" options="-1.4"/>
  489. <compile files="directory.jar/Hello.java" inpath="directory.jar/inOne.custom,directory.jar/inTwo" aspectpath="directory.jar/weave.jar" outjar="directory.jar/outJar.jar"/>
  490. <run class="Hello" classpath="$sandbox/directory.jar/outJar.jar,$sandbox/directory.jar/weave.jar">
  491. <stdout>
  492. <line text="Before call"/>
  493. <line text="Before execution"/>
  494. <line text="Hello AspectJ not just Java"/>
  495. </stdout>
  496. </run>
  497. </ajc-test>
  498. <ajc-test dir="bugs152/pr136393" title="NPE in makePreMethod">
  499. <compile files="World.aj" options="-1.5">
  500. <message kind="warning" line="10" text="this affected type is not exposed to the weaver: java.lang.String [Xlint:typeNotExposedToWeaver]"/>
  501. <message kind="error" line="11" text="h cannot be resolved"/>
  502. <message kind="error" line="16" text="Stystems cannot be resolved"/>
  503. </compile>
  504. </ajc-test>
  505. <ajc-test dir="bugs152/pr135068" title="ltw verifyerror">
  506. <compile files="C.java,Ajava.java" options="-1.5 -XnoInline"/>
  507. <run class="C"/>
  508. </ajc-test>
  509. <ajc-test dir="bugs152/pr135068" title="ltw verifyerror - 2">
  510. <compile files="C2.java,Ajava2.java" options="-1.5 -XnoInline">
  511. <message kind="error" line="13" text="advice can not be declared static"/>
  512. </compile>
  513. </ajc-test>
  514. <ajc-test dir="bugs152/pr135068" title="ltw verifyerror - 3">
  515. <compile files="t/C.java" options="-1.5"/>
  516. <compile files="t/Ajava.java" options="-1.5">
  517. <message kind="warning" line="13" text="advice defined"/>
  518. </compile>
  519. <run class="t.C" ltw="aop.xml"/>
  520. </ajc-test>
  521. <ajc-test dir="bugs152/pr135068" title="ltw verifyerror - 4">
  522. <compile files="t/C2.java" options="-1.5"/>
  523. <compile files="t/Ajava2.java" options="-1.5">
  524. <message kind="error" line="13" text="advice can not be declared static"/>
  525. </compile>
  526. </ajc-test>
  527. <ajc-test dir="bugs152/pr142165" title="broken concretization">
  528. <compile files="C.java" options="-1.5"/>
  529. <compile files="A.java" options="-1.5"/>
  530. <run class="C" ltw="aop.xml">
  531. <stderr>
  532. <line text="warning at Type 'AA' (no debug info available)::0 no match for this type name: SomeType [Xlint:invalidAbsoluteTypeName]"/>
  533. <line text="foo running"/>
  534. </stderr>
  535. </run>
  536. </ajc-test>
  537. <ajc-test dir="bugs152/pr142165" title="broken concretization - 2">
  538. <compile files="C.java" options="-1.5"/>
  539. <compile files="A.java" options="-1.5"/>
  540. <run class="C" ltw="aop2.xml">
  541. <stderr>
  542. <line text="foo running"/>
  543. </stderr>
  544. </run>
  545. </ajc-test>
  546. <ajc-test dir="bugs152/pr142165" title="broken concretization - 3">
  547. <compile files="C.java" options="-1.5"/>
  548. <compile files="A.java" options="-1.5"/>
  549. <run class="C" ltw="aop3.xml">
  550. <stderr>
  551. <line text="advice"/>
  552. <line text="foo running"/>
  553. </stderr>
  554. </run>
  555. </ajc-test>
  556. <ajc-test dir="bugs152/pr134425" title="super ITDs">
  557. <compile files="Derived.aj" options="-1.5"/>
  558. <run class="Derived"/>
  559. </ajc-test>
  560. <ajc-test dir="bugs152/pr128443" title="covariance and decp - 1">
  561. <compile files="Covariance.java" options="-1.5"/>
  562. </ajc-test>
  563. <ajc-test dir="bugs152/pr147701" title="package for exception ignored">
  564. <compile files="TestBean.java" options="-1.5"/>
  565. <run class="a.b.c.TestBean"/>
  566. </ajc-test>
  567. <ajc-test dir="bugs152/pr147701" title="package for exception ignored - 2">
  568. <compile files="TestBean2.java" options="-1.5"/>
  569. <run class="a.b.c.TestBean2"/>
  570. </ajc-test>
  571. <ajc-test dir="bugs152/pr147701" title="package for exception ignored - 3">
  572. <compile files="TestBean3.java" options="-1.5">
  573. <message kind="error" text="@DeclareParents: defaultImpl=&quot;a.b.c.Impl&quot; does not implement the interface 'a.b.c.I'"/>
  574. </compile>
  575. </ajc-test>
  576. <!-- wont work whilst the compiler BuildArgParser.setDebugOptions is always switching debug on -->
  577. <ajc-test dir="bugs152/pr129408" title="long winded ataj messages">
  578. <compile files="AtAj.java" options="-XterminateAfterCompilation -g:none -1.5"/>
  579. <compile files="C.java" options="-g:none -1.5"/>
  580. <run class="C" ltw="aop.xml">
  581. <!-- should check for expected stderr output here -->
  582. </run>
  583. </ajc-test>
  584. <ajc-test dir="ltw"
  585. title="Ensure no weaving without included aspects"
  586. keywords="reweavable">
  587. <compile
  588. files="TestMain.java, Main.java"
  589. >
  590. </compile>
  591. <run class="TestMain" ltw="aop-optionsonly.xml">
  592. <stdout>
  593. <line text="Main.main"/>
  594. <line text="Main.test1"/>
  595. <line text="Main.test2"/>
  596. </stdout>
  597. <stderr>
  598. <line text="info AspectJ Weaver Version"/>
  599. <line text="info register classloader org.aspectj.weaver.loadtime.WeavingURLClassLoader"/>
  600. <line text="info using"/>
  601. <line text="info no aspects registered. Disabling weaver for class loader org.aspectj.weaver.loadtime.WeavingURLClassLoader"/>
  602. </stderr>
  603. </run>
  604. </ajc-test>
  605. <ajc-test dir="ltw" title="weaveinfo messages with include and exclude">
  606. <compile files="EmptyTest1.java, EmptyTest2.java"/>
  607. <compile files="EmptyAspect.aj"/>
  608. <run class="EmptyTest1" ltw="aop-emptytests.xml">
  609. <stdout>
  610. <line text="EmptyTest1.main()"/>
  611. <line text="EmptyTest2.main()"/>
  612. </stdout>
  613. <stderr>
  614. <line text="info AspectJ Weaver Version"/>
  615. <line text="info register classloader org.aspectj.weaver.loadtime.WeavingURLClassLoader"/>
  616. <line text="info using configuration"/>
  617. <line text="info register aspect EmptyAspect"/>
  618. <line text="debug weaving"/>
  619. <line text="debug not weaving"/>
  620. </stderr>
  621. </run>
  622. </ajc-test>
  623. <ajc-test dir="bugs152/pr147845" title="Generic abstract aspect hierarchy with bounds">
  624. <compile files="GenericAspectHierarchy.aj" options="-1.5">
  625. <message kind="warning" line="25" text="a match"/>
  626. <message kind="warning" line="27" text="a match"/>
  627. </compile>
  628. </ajc-test>
  629. <ajc-test dir="bugs152/pr147801" title="duplicate bridge methods">
  630. <compile files="Advisor.aj" inpath="foo.jar" options="-1.5"/>
  631. <run class="Foo">
  632. <stderr>
  633. <line text="x"/>
  634. <line text="1) public Sub Foo.getParameterMetaData() throws MyException"/>
  635. </stderr>
  636. </run>
  637. </ajc-test>
  638. <ajc-test dir="bugs152/pr148007" title="jrockit boolean fun">
  639. <compile files="test/BooleanUnitTest.java, test/LoggingAspect.aj"/>
  640. <run class="test.BooleanUnitTest"/>
  641. </ajc-test>
  642. <ajc-test dir="bugs152/pr148007/purejava" title="jrockit boolean fun (no aspects)">
  643. <compile files="test/BooleanUnitTest.java, test/LoggingAspect.java" options="-inlineJSR"/>
  644. <run class="test.BooleanUnitTest"/>
  645. </ajc-test>
  646. <ajc-test dir="features152/synthetic" title="synthetic ajc$ members">
  647. <compile files="TheWholeShow.aj" options="-1.5"/>
  648. <run class="TheWholeShow"/>
  649. </ajc-test>
  650. <ajc-test dir="bugs152/pr148786" title="freaky new array joinpoint">
  651. <compile files="A.java" options="-Xjoinpoints:arrayconstruction"/>
  652. <run class="A">
  653. <stderr>
  654. <line text="new array: class [[B"/>
  655. </stderr>
  656. </run>
  657. </ajc-test>
  658. <ajc-test dir="bugs152/pr148727" pr="148727"
  659. title="integrated compilation calling aspectOf and hasAspect" >
  660. <compile files="Asp.aj, Client.java" options="-source 1.4"/>
  661. <run class="Client">
  662. <stdout>
  663. <line text="Can call aspectOf? Asp@"/>
  664. </stdout>
  665. </run>
  666. </ajc-test>
  667. <ajc-test dir="bugs152/pr148727" pr="148727"
  668. title="separate compilation calling aspectOf and hasAspect" >
  669. <compile files="Asp.aj" outjar="asp.jar"/>
  670. <compile files="Client.java" classpath="asp.jar" options="-source 1.4"/>
  671. <run class="Client">
  672. <stdout>
  673. <line text="Can call aspectOf? Asp@"/>
  674. </stdout>
  675. </run>
  676. </ajc-test>
  677. <ajc-test dir="bugs152" title="new iprogramelement method getParameterSignatures">
  678. <compile files="pr141730a.java" options="-emacssym -Xset:minimalModel=false"/>
  679. </ajc-test>
  680. <ajc-test dir="bugs152" title="new iprogramelement method getParameterSignatures with generics">
  681. <compile files="pr141730b.java" options="-1.5 -emacssym -Xset:minimalModel=false"/>
  682. </ajc-test>
  683. </suite>