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

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