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.

ajc162.xml 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <!-- AspectJ v1.6.2 Tests -->
  3. <suite>
  4. <ajc-test dir="bugs162/pr247683" title="null delegate for array">
  5. <compile options="-1.5" files="A.java"/>
  6. </ajc-test>
  7. <ajc-test dir="bugs162/IntoBinary" title="binary aspects model">
  8. <compile options="-1.5 -emacssym" files="Clazz.java" aspectpath="binaryaspect.jar"/>
  9. </ajc-test>
  10. <ajc-test dir="bugs162/pr246918" title="ltw perclause">
  11. <compile options="-1.5" files="Code.java Dode.java" outjar="code.jar"/>
  12. <compile options="-1.5 -Xlint:ignore" files="Base.java" outjar="aspects.jar"/>
  13. <run class="Code" classpath="aspects.jar,code.jar" ltw="aop1.xml">
  14. <stderr>
  15. <line text="advice fired class Code"/>
  16. <line text="advice fired class Dode"/>
  17. </stderr>
  18. </run>
  19. </ajc-test>
  20. <ajc-test dir="bugs162/pr246918" title="ltw perclause - 2">
  21. <compile options="-1.5" files="Code.java Dode.java" outjar="code.jar"/>
  22. <compile options="-1.5 -Xlint:ignore" files="Base.java" outjar="aspects.jar"/>
  23. <run class="Code" classpath="aspects.jar,code.jar" ltw="aop2.xml">
  24. <stderr>
  25. <line text="advice fired class Dode"/>
  26. </stderr>
  27. </run>
  28. </ajc-test>
  29. <ajc-test dir="bugs162/pr246918" title="ltw perclause - 3">
  30. <compile options="-1.5" files="Code.java Dode.java" outjar="code.jar"/>
  31. <compile options="-1.5 -Xlint:ignore" files="Base2.java" outjar="aspects.jar"/>
  32. <run class="Code" classpath="aspects.jar,code.jar" ltw="aop3.xml">
  33. <stderr>
  34. <line text="advice fired class Dode"/>
  35. </stderr>
  36. </run>
  37. </ajc-test>
  38. <ajc-test dir="bugs162/pr246918" title="ltw perclause - 4">
  39. <compile options="-1.5" files="Code.java Dode.java" outjar="code.jar"/>
  40. <compile options="-1.5 -Xlint:ignore" files="Base2.java" outjar="aspects.jar"/>
  41. <run class="Code" classpath="aspects.jar,code.jar" ltw="aop4.xml">
  42. <stderr>
  43. <line text="Unrecognized per clause specified"/>
  44. <line text="Concrete-aspect 'SubAspect' could not be registered"/>
  45. <line text="warning failure(s) registering aspects."/>
  46. </stderr>
  47. </run>
  48. </ajc-test>
  49. <ajc-test dir="bugs162/pr246264" title="anno value binding">
  50. <compile options="-1.5" files="A.java"/>
  51. <run class="A"/>
  52. </ajc-test>
  53. <ajc-test dir="bugs162/pr211607" title="around advice proceed">
  54. <compile options="-1.5" files="Bug.java"/>
  55. <run class="Bug"/>
  56. </ajc-test>
  57. <ajc-test dir="bugs162/pr163005" title="advising joinpoints in interfaces">
  58. <compile files="SomeClass.java SomeInterface.java ProblemAspect.java" options="-1.4">
  59. <message kind="warning" text="Cannot advise join point 'method-call(java.lang.Class java.lang.Class.forName(java.lang.String))' in interface 'SomeInterface' with around advice from 'ProblemAspect.java' line '7' as it will lead to creation of code in an interface (compiler limitation, bug 163005)"/>
  60. </compile>
  61. <run class="SomeClass"/>
  62. </ajc-test>
  63. <ajc-test dir="bugs162/pr176905" title="chained itds">
  64. <compile options="-1.5" files="ChainedItd.aj">
  65. </compile>
  66. <run class="ChainedItd">
  67. <stderr/> <!-- no errors-->
  68. </run>
  69. </ajc-test>
  70. <ajc-test dir="bugs162/pr198341" title="dec atanno and decp">
  71. <compile options="-1.5 -showWeaveInfo" files="AnnotationAspect.java">
  72. <message kind="weave" text="'Annotated' (AnnotationAspect.java:12) is annotated with @TestAnnotation2 type annotation from 'AnnotationAspect' (AnnotationAspect.java:18)"/>
  73. <message kind="weave" text="Extending interface set for type 'Annotated' (AnnotationAspect.java) to include 'Marker' (AnnotationAspect.java)"/>
  74. </compile>
  75. </ajc-test>
  76. <ajc-test dir="bugs162/pr197720" title="missing markers on inherited annotated method">
  77. <compile files="C1.java C2.java C3.java MyAnn.java MyAnnAspect.java" options="-1.5 -showWeaveInfo">
  78. <message kind="weave" text="Join point 'method-call(void test.aspects.C1.aMethod())' in Type 'test.aspects.C1' (C1.java:12) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
  79. <message kind="weave" text="Join point 'method-call(void test.aspects.C2.aMethod())' in Type 'test.aspects.C2$InnerClass' (C2.java:17) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
  80. <message kind="weave" text="Join point 'method-call(void test.aspects.C2.aMethod())' in Type 'test.aspects.C2' (C2.java:7) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
  81. <message kind="weave" text="Join point 'method-call(void test.aspects.C2.aMethod())' in Type 'test.aspects.C2' (C2.java:28) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
  82. <message kind="weave" text="Join point 'method-call(void test.aspects.C1.aMethod())' in Type 'test.aspects.C3$InnerClass' (C3.java:22) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
  83. <message kind="weave" text="Join point 'method-call(void test.aspects.C2.aMethod())' in Type 'test.aspects.C3$InnerClass' (C3.java:25) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
  84. <message kind="weave" text="Join point 'method-call(void test.aspects.C1.aMethod())' in Type 'test.aspects.C3' (C3.java:8) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
  85. <message kind="weave" text="Join point 'method-call(void test.aspects.C2.aMethod())' in Type 'test.aspects.C3' (C3.java:11) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
  86. <message kind="weave" text="Join point 'method-call(void test.aspects.C1.aMethod())' in Type 'test.aspects.C3' (C3.java:32) advised by around advice from 'test.aspects.MyAnnAspect' (MyAnnAspect.java:16)"/>
  87. </compile>
  88. </ajc-test>
  89. <ajc-test dir="bugs162/pr211146" title="lost generic sig on itd">
  90. <compile files="GenericsLost.java" options="-1.5"/>
  91. <run class="GenericsLost"/>
  92. </ajc-test>
  93. <ajc-test dir="bugs162/pr211146" title="lost generic sig on itd - 2">
  94. <compile files="GenericsLost2.java" outjar="code.jar" options="-1.5"/>
  95. <compile files="GenericsLost2Dep.java" classpath="$sandbox/code.jar" options="-1.5"/>
  96. </ajc-test>
  97. <ajc-test dir="bugs162/pr211146" title="lost generic sig on itd - 3">
  98. <compile files="GenericsLost3.java" options="-1.5"/>
  99. <run class="GenericsLost3"/>
  100. </ajc-test>
  101. <ajc-test dir="bugs162/pr211146" title="lost generic sig on itd - 4">
  102. <compile files="GenericsLost4.java" options="-1.5"/>
  103. <run class="GenericsLost4"/>
  104. </ajc-test>
  105. <ajc-test dir="bugs162/pr211146" title="lost generic sig on itd - 5">
  106. <compile files="GenericsLost5.java" options="-1.5"/>
  107. <run class="GenericsLost5"/>
  108. </ajc-test>
  109. <ajc-test dir="bugs162/pr194429" title="missing context">
  110. <compile files="A.java" options="-1.5">
  111. <message kind="error" line="14" text="incompatible type, expected java.util.Set found BindingTypePattern("/>
  112. </compile>
  113. </ajc-test>
  114. <ajc-test dir="bugs162/pr210114" title="warnings for limitations">
  115. <compile files="TestAspect.java" options="-1.5">
  116. <message kind="warning" text="Only before advice is supported on handler join points (compiler limitation)"/>
  117. <message kind="warning" text="around on initialization not supported (compiler limitation)"/>
  118. <message kind="warning" text="around on pre-initialization not supported (compiler limitation)"/>
  119. </compile>
  120. </ajc-test>
  121. <ajc-test dir="bugs162/pr244830" title="ptw initFailureCause">
  122. <compile files="PTW.java" options="-1.5"/>
  123. <run class="PTW"/>
  124. </ajc-test>
  125. <ajc-test dir="bugs162/pr222648" title="generic itds - overrides">
  126. <compile files="DataAspect.aj DataInterface.java Foo.java FooBase.java Marker.java Resource.java" options="-1.5"/>
  127. </ajc-test>
  128. <ajc-test dir="bugs162/pr222648" title="generic itds - overrides - 2">
  129. <compile files="X.java" options="-1.5"/>
  130. </ajc-test>
  131. <ajc-test dir="bugs162/pr145391" title="itd calling generic method">
  132. <compile files="GenericType.java" options="-1.5"/>
  133. <run class="GenericType"/>
  134. </ajc-test>
  135. <ajc-test dir="bugs162/pr145391" title="itd calling generic method - 2">
  136. <compile files="GenericType2.java" options="-1.5">
  137. <message kind="error" text="The method getValue(V) in the type GenericType2&lt;V&gt; is not applicable for the arguments"/>
  138. </compile>
  139. </ajc-test>
  140. <ajc-test dir="bugs162/pr241047" title="generic decp">
  141. <compile files="SomeAspect.java SomeBaseClass.java SomeSubClass.java SomeSubClass2.java SomeSubClass3.java SomeInterface.java SomeBaseClass2.java SomeBaseClass3.java" options=" -Xlint:ignore -1.5">
  142. </compile>
  143. <run class="SomeBaseClass">
  144. <stdout>
  145. <line text="correct advice :-)"/>
  146. <line text="some base method"/>
  147. <line text="correct advice :-)"/>
  148. <line text="some sub method"/>
  149. <line text="correct advice :-)"/>
  150. <line text="some base method2"/>
  151. <line text="correct advice :-)"/>
  152. <line text="some sub method2"/>
  153. <line text="correct advice :-)"/>
  154. <line text="some base method3"/>
  155. <line text="correct advice :-)"/>
  156. <line text="some sub method3"/>
  157. </stdout>
  158. </run>
  159. </ajc-test>
  160. <ajc-test dir="bugs162/pr241047/case2" title="generic decp - 2">
  161. <compile files="SomeAspect.java SomeBaseClass.java SomeSubClass.java SomeInterface.java" options=" -Xlint:ignore -1.5">
  162. </compile>
  163. <run class="SomeBaseClass">
  164. <stdout>
  165. <line text="correct advice :-)"/>
  166. <line text="some base method"/>
  167. <line text="correct advice :-)"/>
  168. <line text="some sub method"/>
  169. </stdout>
  170. </run>
  171. </ajc-test>
  172. <ajc-test dir="bugs162/pr239539" title="public pointcut">
  173. <compile files="PrintAround.java PrintAroundFoo.java Foo.java" options="-1.5">
  174. <message kind="error" line="7" text="pointcut 'bar.PrintAround.method()' is not visible from type "/>
  175. </compile>
  176. </ajc-test>
  177. <ajc-test dir="bugs162/pr242797/case1" title="generic itds - 1">
  178. <compile files="ClassUtils.java CMEFinder.java Finder.java H2Deployment.java Localized.java LocalizedFinder.java OnetElement.java OnetFinder.java Partitioned.java PartitionedFinder.java" options="-1.5">
  179. </compile>
  180. </ajc-test>
  181. <ajc-test dir="bugs162/pr242797/case2" title="generic itds - 2">
  182. <compile files="GenericMethodAspect.aj GenericMethodInterface.java GenericMethodImpl.java" options="-1.5">
  183. </compile>
  184. </ajc-test>
  185. <ajc-test dir="bugs162/pr242797/case3" title="generic itds - 3">
  186. <compile files="GenericMethodAspect.aj GenericMethodInterface.java GenericMethodImpl.java GenericMethodImpl2.java Type1.java Type2.java" options="-1.5">
  187. </compile>
  188. </ajc-test>
  189. <ajc-test dir="bugs162/pr241847" title="param annos pipelining">
  190. <compile files="Asp.aj Ann.java CC.java II.java LongLong.java" options="-1.5 -showWeaveInfo">
  191. <message kind="weave" text="Join point 'method-execution(void LongLong.m1(java.lang.String))' in Type 'LongLong' (LongLong.java:2) advised by before advice from 'Asp' (Asp.aj:5)"/>
  192. <message kind="weave" line="3"/>
  193. </compile>
  194. </ajc-test>
  195. <ajc-test dir="bugs162/pr239441" title="annotation decp">
  196. <compile files="Test3.java SampleAspect.java" options="-1.5 -showWeaveInfo -XhasMember">
  197. </compile>
  198. </ajc-test>
  199. <ajc-test dir="bugs162/pr241861" title="param annotation inner class">
  200. <compile files="Outer.java Ann.java Asp.java" options="-1.5 -showWeaveInfo">
  201. <message kind="weave" text="Join point 'constructor-execution(void Outer$Inner.&lt;init&gt;(Outer, java.lang.String))' in Type 'Outer$Inner' (Outer.java:5) advised by before advice from 'Asp' (Asp.java:2)"/>
  202. </compile>
  203. </ajc-test>
  204. <ajc-test dir="bugs162/pr241861" title="param annotation inner class - 2">
  205. <compile files="X.java" options="-1.5 -showWeaveInfo">
  206. <message kind="weave" text="Join point 'constructor-execution(void Outer$Inner.&lt;init&gt;(Outer, java.lang.Integer))' in Type 'Outer$Inner' (X.java:7) advised by before advice from 'Asp' (X.java:2)"/>
  207. </compile>
  208. </ajc-test>
  209. <ajc-test dir="bugs162/pr241861" title="param annotation inner class - 3">
  210. <compile files="Y.java" options="-1.5 -showWeaveInfo">
  211. <message kind="weave" text="Join point 'constructor-execution(void Outer$Inner.&lt;init&gt;(Outer, java.lang.String))' in Type 'Outer$Inner' (Y.java:7) advised by before advice from 'Asp' (Y.java:2)"/>
  212. </compile>
  213. </ajc-test>
  214. <ajc-test dir="bugs162/pr240693" title="privileged generics">
  215. <compile files="PayloadClass.java SomeInterface.java GenericClassInAdvice.java" options="-1.5">
  216. <message kind="warning" text="advice defined in GenericClassInAdvice has not been applied [Xlint:adviceDidNotMatch]"/>
  217. </compile>
  218. </ajc-test>
  219. <ajc-test dir="bugs162/pr238992" title="annotation value decp">
  220. <compile files="Foo.java" options="-1.5 -showWeaveInfo">
  221. <message kind="weave" text="Extending interface set for type 'Goo'"/>
  222. </compile>
  223. <run class="Foo"/>
  224. </ajc-test>
  225. <ajc-test dir="bugs162/pr238992" title="annotation value decp - 2">
  226. <compile files="Foo2.java" options="-1.5 -showWeaveInfo">
  227. <message kind="weave" text="Extending interface set for type 'Goo'"/>
  228. <message kind="weave" text="Extending interface set for type 'Hoo'"/>
  229. </compile>
  230. <run class="Foo2"/>
  231. </ajc-test>
  232. <ajc-test dir="bugs162/pr238992" title="annotation value decp - 3">
  233. <compile files="Foo3.java" options="-1.5 -showWeaveInfo">
  234. <message kind="weave" text="Extending interface set for type 'Goo'"/>
  235. </compile>
  236. <run class="Foo3"/>
  237. </ajc-test>
  238. <ajc-test dir="bugs162/pr238992" title="annotation value decp - 4">
  239. <compile files="Foo4.java" options="-1.5 -showWeaveInfo">
  240. <message kind="weave" text="Extending interface set for type 'Goo'"/>
  241. <message kind="weave" text="Extending interface set for type 'Hoo'"/>
  242. </compile>
  243. <run class="Foo4"/>
  244. </ajc-test>
  245. <ajc-test dir="bugs162/pr238992" title="annotation value decp - 5">
  246. <compile files="Foo5.java" options="-1.5 -showWeaveInfo">
  247. <message kind="weave" text="Extending interface set for type 'Goo'"/>
  248. <message kind="weave" text="Extending interface set for type 'Hoo'"/>
  249. </compile>
  250. <run class="Foo5"/>
  251. </ajc-test>
  252. <ajc-test dir="bugs162/pr233718" title="parameter subsetting - matching">
  253. <compile files="Matching.java" options="-1.5 -showWeaveInfo">
  254. <message kind="weave" text="Join point 'method-execution(void Matching.m(java.lang.String))' in Type 'Matching' (Matching.java:3) advised by before advice from 'Matching' (Matching.java:8)"/>
  255. <message kind="weave" text="'method-execution(void Matching.m(java.lang.String, java.lang.String))' in Type 'Matching' (Matching.java:4) advised by before advice from 'Matching' (Matching.java:8)"/>
  256. <message kind="weave" text="'method-execution(void Matching.m(int, java.lang.String))' in Type 'Matching' (Matching.java:5) advised by before advice from 'Matching' (Matching.java:8)"/>
  257. </compile>
  258. </ajc-test>
  259. <ajc-test dir="bugs162/pr233718" title="parameter subsetting - args matching">
  260. <compile files="ArgsMatching.java" options="-1.5 -showWeaveInfo">
  261. <!--
  262. <message kind="weave" text="Join point 'method-execution(void Matching.m(java.lang.String))' in Type 'Matching' (Matching.java:3) advised by before advice from 'Matching' (Matching.java:8)"/>
  263. <message kind="weave" text="'method-execution(void Matching.m(java.lang.String, java.lang.String))' in Type 'Matching' (Matching.java:4) advised by before advice from 'Matching' (Matching.java:8)"/>
  264. <message kind="weave" text="'method-execution(void Matching.m(int, java.lang.String))' in Type 'Matching' (Matching.java:5) advised by before advice from 'Matching' (Matching.java:8)"/>
  265. -->
  266. </compile>
  267. </ajc-test>
  268. <ajc-test dir="bugs162/pr233718" title="parameter subsetting - args binding">
  269. <compile files="ArgsBinding.java" options="-1.5"/>
  270. <run class="ArgsBinding">
  271. <stdout>
  272. <line text="0) a"/>
  273. <line text="0) b"/>
  274. </stdout>
  275. </run>
  276. </ajc-test>
  277. <ajc-test dir="bugs162/pr198181" title="ataspectj ltw pertarget">
  278. <compile files="M.java" outjar="code.jar"/>
  279. <compile files="A.java" classpath="code.jar" options="-1.5 -Xlint:ignore"/>
  280. <run class="m.M" classpath="$sandbox/code.jar" ltw="aop.xml">
  281. <stdout>
  282. <line text="tick 0"/>
  283. <line text="tick 0"/>
  284. <line text="tick 0"/>
  285. </stdout>
  286. </run>
  287. </ajc-test>
  288. </suite>