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.

ajc161.xml 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <!-- AspectJ v1.6.1 Tests -->
  3. <suite>
  4. <ajc-test dir="bugs161/pr203367" title="generic marker match">
  5. <compile files="CantMatchOnInterfaceIntroducedToGenericClass.java" options="-1.5"/>
  6. <run class="bug.CantMatchOnInterfaceIntroducedToGenericClass"/>
  7. </ajc-test>
  8. <ajc-test dir="bugs161/pr198196" title="super itds - 2">
  9. <compile files="Marker.java Foo.java MarkerAspect2.java"/>
  10. <run class="Foo">
  11. <stdout>
  12. <line text="a"/>
  13. <line text="a"/>
  14. <line text="a"/>
  15. <line text="a"/>
  16. <line text="a"/>
  17. <line text="a"/>
  18. </stdout>
  19. </run>
  20. </ajc-test>
  21. <ajc-test dir="bugs161/pr198196" title="super itds - 3">
  22. <compile files="Marker.java Foo.java MarkerAspect1.java"/>
  23. <run class="Foo"/>
  24. </ajc-test>
  25. <ajc-test dir="bugs161/pr198196" title="super itds - 4">
  26. <compile files="Marker.java Foo.java MarkerAspect3.java"/>
  27. <run class="Foo"/>
  28. </ajc-test>
  29. <ajc-test dir="bugs161/pr134425" title="super itds">
  30. <compile files="Derived.java Base.java"/>
  31. <run class="pkg.Derived"/>
  32. </ajc-test>
  33. <ajc-test dir="bugs161/pr237381" title="ataspectj deow - 1">
  34. <compile files="Deow1.java" options="-1.5">
  35. <message kind="warning" line="7" text="fromX"/>
  36. <message kind="warning" line="15" text="fromY"/>
  37. </compile>
  38. </ajc-test>
  39. <ajc-test dir="bugs161/pr237381" title="ataspectj deow - 2">
  40. <compile files="Deow2.java" options="-1.5">
  41. <message kind="error" line="7" text="fromX"/>
  42. <message kind="error" line="15" text="fromY"/>
  43. </compile>
  44. </ajc-test>
  45. <ajc-test dir="bugs161/pr102733" title="running broken code">
  46. <compile files="Invoker.java C.java" options="">
  47. <message kind="error" line="2" text="Syntax error"/>
  48. </compile>
  49. <run class="Invoker"/>
  50. </ajc-test>
  51. <ajc-test dir="bugs161/pr102733" title="running broken code - 2">
  52. <compile files="Invoker2.java C2.java" options="">
  53. <message kind="error" line="5"/>
  54. </compile>
  55. <run class="Invoker2"/>
  56. </ajc-test>
  57. <ajc-test dir="bugs161/pr168982" title="error on non-abstract generic ataspectj aspect">
  58. <compile files="TracingAspect2.java" options="-1.5">
  59. <message kind="error" line="9"/>
  60. </compile>
  61. </ajc-test>
  62. <ajc-test dir="bugs161/pr234933" title="ignoring type level suppress">
  63. <compile files="Foobar.java" options="-1.5 -Xlint:error"/>
  64. </ajc-test>
  65. <ajc-test dir="bugs161/pr223226" title="duplicate method signature - 2">
  66. <compile files="AspectX.java BInterface.java FooInterface.java AspectXMarker.java Foo.java Test.java" options="-1.5"/>
  67. <run class="Test"/>
  68. </ajc-test>
  69. <ajc-test dir="bugs161/pr223226" title="duplicate method signature">
  70. <compile files="AspectX.java BInterface.java FooInterface.java AspectXMarker.java Foo.java Test.java" options="">
  71. <message kind="error" line="1"/>
  72. <message kind="error" line="2"/>
  73. <message kind="error" line="3"/>
  74. <message kind="error" line="5"/>
  75. </compile>
  76. </ajc-test>
  77. <ajc-test dir="bugs161/pr197719" title="protected methods and around advice - again - 2">
  78. <compile files="test/aspects/C1.java test/aspects/C3.java test/aspects/MyAnn.java test/aspects/MyAnnAspect.java test/aspects2/C2.java" options="-1.5 -showWeaveInfo">
  79. <message kind="weave" text="Join point 'method-call(void test.aspects.C1.aMethod())' in Type 'test.aspects.C1' (C1.java:12) "/>
  80. <!-- first of these through accessor - so line number wrong and target wrong -->
  81. <message kind="weave" text="Join point 'method-call(void test.aspects.C1.aMethod())' in Type 'test.aspects2.C2' (C2.java:1) "/><!-- was line 18 -->
  82. <message kind="weave" text="Join point 'method-call(void test.aspects2.C2.aMethod())' in Type 'test.aspects2.C2' (C2.java:8) "/>
  83. <message kind="weave" text="Join point 'method-call(void test.aspects2.C2.aMethod())' in Type 'test.aspects2.C2' (C2.java:29) "/>
  84. <message kind="weave" text="Join point 'method-call(void test.aspects.C1.aMethod())' in Type 'test.aspects.C3' (C3.java:10) "/>
  85. <message kind="weave" text="Join point 'method-call(void test.aspects2.C2.aMethod())' in Type 'test.aspects.C3' (C3.java:13) "/>
  86. <message kind="weave" text="Join point 'method-call(void test.aspects.C1.aMethod())' in Type 'test.aspects.C3$InnerClass' (C3.java:24) "/>
  87. <message kind="weave" text="Join point 'method-call(void test.aspects2.C2.aMethod())' in Type 'test.aspects.C3$InnerClass' (C3.java:27) "/>
  88. <message kind="weave" text="Join point 'method-call(void test.aspects.C1.aMethod())' in Type 'test.aspects.C3' (C3.java:34) "/>
  89. </compile>
  90. <run class="test.aspects.C3">
  91. </run>
  92. </ajc-test>
  93. <ajc-test dir="bugs161/pr197719" title="protected methods and around advice - again">
  94. <compile files="A.java B.java X.java" options="-1.5"/>
  95. <run class="b.B">
  96. <stdout>
  97. <line text="calling m()"/>
  98. <line text="advice running"/>
  99. <line text="m() running"/>
  100. </stdout>
  101. </run>
  102. </ajc-test>
  103. <ajc-test dir="bugs161/pr230075" title="protected methods and around advice">
  104. <compile files="A.java B.java C.java X.java" options="-1.5"/>
  105. <run class="a.C"/>
  106. </ajc-test>
  107. <ajc-test dir="bugs161/pr174385" title="static strings in annotation pointcuts">
  108. <compile files="StaticFinalStringInPointcutAspect.java" options="-1.5"/>
  109. <run class="bug.StaticFinalStringInPointcutAspect"/>
  110. </ajc-test>
  111. <ajc-test dir="bugs161/pr199130" title="complex bounds on generic aspect - 1">
  112. <compile files="Simple.java" options="-1.5"/>
  113. <run class="Simple">
  114. </run>
  115. </ajc-test>
  116. <ajc-test dir="bugs161/pr199130" title="complex bounds on generic aspect - 2">
  117. <compile files="Complex.java" options="-1.5"/>
  118. <run class="Complex">
  119. </run>
  120. </ajc-test>
  121. <ajc-test dir="bugs161/pr199130" title="complex bounds on generic aspect - 3">
  122. <compile files="Complex2.java" options="-1.5"/>
  123. <run class="Complex2">
  124. </run>
  125. </ajc-test>
  126. <ajc-test dir="bugs161/pr226201" title="generic aspect around advice">
  127. <compile files="IntAspTest.java" options="-1.5"/>
  128. <run class="IntAspTest">
  129. </run>
  130. </ajc-test>
  131. <ajc-test dir="bugs161/pr235829" title="crazy generics and inner types">
  132. <compile files="Main.java a/Adapter.java a/b/Adapter.java" options="-1.5"/>
  133. <run class="Main"/>
  134. </ajc-test>
  135. <ajc-test dir="bugs161/pr235597" title="annotation exposure and generics">
  136. <compile files="AnnotationTest1.java SomeAnnotation.java SomeAspect.java" options="-1.5"/>
  137. <run class="AnnotationTest1">
  138. <stdout>
  139. <line text="@someAspect annotation parameter (call)"/>
  140. <line text="@someAspect annotation no parameter"/>
  141. <line text="@someAspect method name"/>
  142. <line text="@someAspect annotation parameter (execution)"/>
  143. <line text="test 1"/>
  144. <line text="@someAspect annotation parameter (call)"/>
  145. <line text="@someAspect annotation no parameter"/>
  146. <line text="@someAspect method name"/>
  147. <line text="@someAspect annotation parameter (execution)"/>
  148. <line text="test 2"/>
  149. <line text="@someAspect annotation parameter (call)"/>
  150. <line text="@someAspect annotation no parameter"/>
  151. <line text="@someAspect method name"/>
  152. <line text="@someAspect annotation parameter (execution)"/>
  153. <line text="test 3"/>
  154. </stdout>
  155. </run>
  156. </ajc-test>
  157. <ajc-test dir="bugs161/pr235204" title="incorrect call relationship">
  158. <compile files="RecursiveCatcher.java" options="-1.5 -emacssym"/>
  159. </ajc-test>
  160. <ajc-test dir="bugs161/pr233838" title="itd precedence - 1">
  161. <compile files="Z.java" options="-1.5"/>
  162. <run class="Z">
  163. <stdout>
  164. <line text="X.test()"/>
  165. </stdout>
  166. </run>
  167. </ajc-test>
  168. <ajc-test dir="bugs161/pr233838" title="itd precedence - 2">
  169. <compile files="Z2.java" options="-1.5"/>
  170. <run class="Z2">
  171. <stdout>
  172. <line text="Y.test()"/>
  173. </stdout>
  174. </run>
  175. </ajc-test>
  176. <ajc-test dir="bugs161/pr227401" title="getfield problem with generics">
  177. <compile files="Instrumentation.java Fails.java" options="-1.5"/>
  178. <run class="Fails">
  179. <stdout>
  180. <line text="getField(* protS) getField()='protected java.lang.String Fails$A.protS' getDeclaringType()='class Fails$A'"/>
  181. <line text="getField(* prot) getField()='protected int Fails$A.prot' getDeclaringType()='class Fails$A'"/>
  182. <line text="22"/>
  183. <line text="getField(* defS) getField()='java.lang.String Fails$A.defS' getDeclaringType()='class Fails$A'"/>
  184. <line text="getField(* def) getField()='int Fails$A.def' getDeclaringType()='class Fails$A'"/>
  185. <line text="11"/>
  186. <line text="getField(* defS) getField()='java.lang.String Fails$A.defS' getDeclaringType()='class Fails$A'"/>
  187. <line text="getField(* def) getField()='int Fails$A.def' getDeclaringType()='class Fails$A'"/>
  188. <line text="22"/>
  189. </stdout>
  190. </run>
  191. </ajc-test>
  192. <ajc-test dir="bugs161/pr231478" title="generic abstract aspects">
  193. <compile files="Base.java Sub.java AbstractComponent.java AbstractWindow.java" options="-1.5"/>
  194. </ajc-test>
  195. <ajc-test dir="bugs161/pr227993" title="field jp anno value">
  196. <compile files="FieldJP.java" options="-1.5"/>
  197. <run class="FieldJP">
  198. <stderr>
  199. <line text="get of YES field"/>
  200. <line text="fone=0"/>
  201. <line text="get of NO field"/>
  202. <line text="ftwo=0"/>
  203. <line text="fthr=0"/>
  204. <line text="set of YES field"/>
  205. <line text="set of NO field"/>
  206. </stderr>
  207. </run>
  208. </ajc-test>
  209. <ajc-test dir="bugs161/pr231187x" title="generics bounds decp">
  210. <compile files="Cement.java ConcreteClass.java SuperClass.java SuperClassAspect.aj WetCement.java Main.java" options="-1.5"/>
  211. <run class="concrete.Main">
  212. <stdout>
  213. <line text="ran!"/>
  214. </stdout>
  215. </run>
  216. </ajc-test>
  217. <ajc-test dir="bugs161/pr231187x" title="generics bounds decp - 2">
  218. <compile files="Cement.java ConcreteClass.java SuperClass.java WetCement.java" options="-1.5">
  219. <message kind="error" text="The type WetCement is not a valid substitute for the bounded parameter"/>
  220. </compile>
  221. </ajc-test>
  222. <ajc-test dir="bugs161/pr230134" title="ltw inherited cflow">
  223. <compile files="HW.java"/>
  224. <compile files="SimpleTracing.java Tracing.java HelloWorldTracing.java" outjar="foo.jar"/>
  225. <run class="hello.HW" classpath="$sandbox/foo.jar" ltw="aop.xml">
  226. <stdout>
  227. <line text="Hello World"/>
  228. </stdout>
  229. </run>
  230. </ajc-test>
  231. <ajc-test dir="bugs161/pr229910" title="around advice on field set">
  232. <compile files="Test.java" options="-1.5"/>
  233. <run class="Test"/>
  234. </ajc-test>
  235. <ajc-test dir="bugs161/pr226567" title="pipeline compilation and generic return type">
  236. <compile files="BarAspect.aj Foo.java Bar.java" options="-1.5"/>
  237. <compile files="BarAspect.aj Bar.java Foo.java" options="-1.5"/>
  238. </ajc-test>
  239. <ajc-test dir="bugs161/pr235505" title="privileged generic aspect">
  240. <compile files="A.java" options="-1.5"/>
  241. </ajc-test>
  242. <ajc-test dir="bugs161/pr235505" title="privileged generic aspect - 2">
  243. <compile files="B.java" options="-1.5"/>
  244. <run class="B">
  245. <stdout>
  246. <line text="Hello World"/>
  247. <line text="Hello World"/>
  248. </stdout>
  249. </run>
  250. </ajc-test>
  251. <ajc-test dir="bugs161/pr64222" title="parsing around advice no return">
  252. <compile files="C.java" options="-1.5">
  253. <message kind="error" line="6" text="to complete around advice declaration"/>
  254. </compile>
  255. </ajc-test>
  256. <ajc-test dir="bugs161/pr159268" title="before array name">
  257. <compile files="C.java" options="-1.5"/>
  258. </ajc-test>
  259. </suite>