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.

ajc170.xml 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <suite>
  3. <ajc-test dir="bugs170/pr382723" title="generic aspect">
  4. <compile files="FooAspect.java" options="-1.5"/>
  5. </ajc-test>
  6. <ajc-test dir="bugs170/pr382723" title="generic aspect 2">
  7. <compile files="FooAspect2.java" options="-1.5"/>
  8. </ajc-test>
  9. <ajc-test dir="bugs170/pr382723" title="generic aspect 3">
  10. <compile files="FooAspect3.java" options="-1.5"/>
  11. </ajc-test>
  12. <ajc-test dir="bugs170/pr382723" title="generic aspect 4">
  13. <compile files="Foo.java" options="-1.5 -showWeaveInfo">
  14. <message kind="weave" text="Join point 'constructor-call(void java.util.LinkedList.&lt;init&gt;())' in Type 'Foo' (Foo.java:41) advised by around advice from 'Bar' (Foo.java:14)"/>
  15. </compile>
  16. <run class="Foo">
  17. <stdout>
  18. <line text="superaspect getNumber returns -2"/>
  19. <line text="Bar.method() running"/>
  20. <line text="abstract method returns []"/>
  21. </stdout>
  22. </run>
  23. </ajc-test>
  24. <!-- no declare parents, only ITD -->
  25. <ajc-test dir="bugs170/pr382189/one" title="covariant generics 1">
  26. <compile files="A.java A_ITD.aj B.java SuperA.java SuperB.java" options="-1.5"/>
  27. </ajc-test>
  28. <!-- now declare parents and ITD -->
  29. <ajc-test dir="bugs170/pr382189/two" title="covariant generics 2">
  30. <compile files="A.java A_ITD.aj B.java SuperA.java SuperB.java" options="-1.5"/>
  31. </ajc-test>
  32. <!-- now run it -->
  33. <ajc-test dir="bugs170/pr382189/three" title="covariant generics 3">
  34. <compile files="A.java A_ITD.aj B.java SuperA.java SuperB.java" options="-1.5"/>
  35. <run class="A"/>
  36. </ajc-test>
  37. <ajc-test dir="bugs170/pr382435/one" title="covariant generic itds 1">
  38. <compile files="bug/A.java" options="-1.5"/>
  39. </ajc-test>
  40. <ajc-test dir="bugs170/pr382435/two" title="covariant generic itds 2">
  41. <compile files="bug/A.java" options="-1.5"/>
  42. <run class="bug.A"/>
  43. </ajc-test>
  44. <ajc-test dir="bugs170/pr382189" title="covariant generics">
  45. <compile files="covbug/A.java covbug/A_ITD.aj covbug/B.java covbug/SuperA.java covbug/SuperB.java" options="-1.5"/>
  46. <!-- <run class="Foo">
  47. <stdout>
  48. <line text="@Anno()"/></stdout>
  49. </run> -->
  50. </ajc-test>
  51. <ajc-test dir="bugs170/pr377130" title="missing annos on priv aspects">
  52. <compile files="Foo.java" options="-1.5"/>
  53. <run class="Foo">
  54. <stdout>
  55. <line text="@Anno()"/></stdout>
  56. </run>
  57. </ajc-test>
  58. <ajc-test dir="bugs170/pr377130" title="missing annos on priv aspects - 2">
  59. <compile files="Foo2.java" options="-1.5"/>
  60. <run class="Foo2">
  61. <stdout>
  62. <line text="@Anno()"/></stdout>
  63. </run>
  64. </ajc-test>
  65. <ajc-test dir="bugs170/pr376351" title="attribute issue with J7">
  66. <compile files="R.java R1.java" outjar="code.jar" options="-1.5"/>
  67. <compile files="RAj.java" options="-1.7 -Xlint:ignore" outjar="aspects.jar" classpath="code.jar"/>
  68. <compile inpath="code.jar" aspectpath="aspects.jar" options="-showWeaveInfo">
  69. <message kind="weave" text="Join point 'constructor-call(void R.&lt;init&gt;())'"/>
  70. </compile>
  71. <!--
  72. if we had a 1.7 vm we could use this:
  73. <compile files="RAj.java" options="-1.7 -Xlint:ignore"/>
  74. <run class="R" ltw="aop.xml">
  75. <stderr>
  76. <line text="org.aspectj.weaver.tools.Jdk14Trace error"/>
  77. <line text="Unsupported major.minor version 51.0"/>
  78. <line text="java.lang.UnsupportedClassVersionError: RAj :"/>
  79. </stderr>
  80. </run>
  81. -->
  82. </ajc-test>
  83. <ajc-test dir="bugs170/pr376139" title="switch on enum">
  84. <compile files="Code.java" options="-1.5"/>
  85. <run class="Code"/>
  86. </ajc-test>
  87. <ajc-test dir="bugs170/ltw" title="dec at field ordering 1">
  88. <compile files="Anno.java TriggerAll.java MyObject.java Main.java" options="-1.5"/>
  89. <run class="ch.tests.Main">
  90. <stdout>
  91. <line text="Triggered"/>
  92. <line text="Triggered"/>
  93. </stdout>
  94. </run>
  95. </ajc-test>
  96. <ajc-test dir="bugs170/ltw" title="dec at field ordering 2">
  97. <compile files="Anno.java Main.java TriggerAll.java MyObject.java" options="-1.5"/>
  98. <run class="ch.tests.Main">
  99. <stdout>
  100. <line text="Triggered"/>
  101. <line text="Triggered"/>
  102. </stdout>
  103. </run>
  104. </ajc-test>
  105. <ajc-test dir="bugs170/ltw" title="dec at field ordering ltw 1">
  106. <compile files="Anno.java Main.java MyObject.java" options="-1.5"/>
  107. <compile files="TriggerAll.java" options="-Xlint:ignore -1.5 "/>
  108. <run class="ch.tests.Main" ltw="aop.xml">
  109. <stdout>
  110. <line text="Triggered"/>
  111. <line text="Triggered"/>
  112. </stdout>
  113. </run>
  114. </ajc-test>
  115. <ajc-test dir="bugs170/xmldefs" title="xml defined dec at method">
  116. <compile files="Hello.java Anno.java" options="-1.5"/>
  117. <run class="Hello" ltw="aop.xml">
  118. <stdout>
  119. <line text="Hello"/>
  120. <line text="World"/>
  121. <line text="Annotations on sayHello? true"/>
  122. <line text="Annotation count is 1"/>
  123. <line text="@Anno"/>
  124. </stdout>
  125. </run>
  126. </ajc-test>
  127. <ajc-test dir="bugs170/xmldefs" title="xml defined dec at method 2">
  128. <compile files="Hello.java Anno2.java" options="-1.5"/>
  129. <run class="Hello" ltw="aop2.xml">
  130. <stdout>
  131. <line text="Hello"/>
  132. <line text="World"/>
  133. <line text="Annotations on sayHello? false"/>
  134. </stdout>
  135. <stderr>
  136. <line text="info AspectJ Weaver"/>
  137. <line text="info register"/>
  138. <line text="info using configuration"/>
  139. <line text="info define aspect ConjuredUp"/>
  140. <line text="error declare is using an annotation type that does not have runtime retention: @Anno2"/>
  141. <line text="info weaver"/>
  142. </stderr>
  143. </run>
  144. </ajc-test>
  145. <ajc-test dir="bugs170/xmldefs" title="xml defined dec at field">
  146. <compile files="Hello2.java Anno.java" options="-1.5"/>
  147. <run class="Hello2" ltw="aop3.xml">
  148. <stdout>
  149. <line text="Annotations on i? true"/>
  150. <line text="Annotation count is 1"/>
  151. <line text="@Anno"/>
  152. </stdout>
  153. </run>
  154. </ajc-test>
  155. <ajc-test dir="bugs170/xmldefs" title="xml defined dec anno - variants 1">
  156. <compile files="Hello4.java Anno4.java" options="-1.5"/>
  157. <run class="Hello4" ltw="aop4.xml">
  158. <stdout>
  159. <line text="Annotations on field1? true"/>
  160. <line text="Annotation count is 4"/>
  161. <line text="@AnnoBoolean(value=true, zzz=false)"/>
  162. <line text="@AnnoClass(value=class java.lang.Integer, ccc=class java.lang.String)"/>
  163. <line text="@AnnoLong(value=999, jjj=111)"/>
  164. <line text="@AnnoString(value=set from xml, sss=xyz)"/>
  165. <line text="Annotations on field2? true"/>
  166. <line text="Annotation count is 1"/>
  167. <line text="@AnnoClass(value=class java.lang.String, ccc=class java.lang.String)"/>
  168. </stdout>
  169. </run>
  170. </ajc-test>
  171. <ajc-test dir="bugs170/xmldefs" title="xml defined dec anno - variants 2">
  172. <compile files="Hello5.java Anno5.java" options="-1.5"/>
  173. <run class="Hello5" ltw="aop5.xml">
  174. <stdout>
  175. <line text="Annotations on field1? true"/>
  176. <line text="Annotation count is 4"/>
  177. <line text="@AnnoChar(value=z, ccc=a)"/>
  178. <line text="@AnnoDouble(value=99.0, ddd=3.0)"/>
  179. <line text="@AnnoFloat(value=6.0, fff=4.0)"/>
  180. <line text="@AnnoShort(value=8, sss=3)"/>
  181. <line text="Annotations on field2? true"/>
  182. <line text="Annotation count is 2"/>
  183. <line text="@AnnoByte(value=88, bbb=66)"/>
  184. <line text="@AnnoInt(iii=111, value=99)"/>
  185. </stdout>
  186. </run>
  187. </ajc-test>
  188. <ajc-test dir="bugs170/xmldefs" title="xml defined dec anno - multiple values">
  189. <compile files="Hello6.java Anno6.java" options="-1.5"/>
  190. <run class="Hello6" ltw="aop6.xml">
  191. <stdout>
  192. <line text="Annotations on field1? true"/>
  193. <line text="Annotation count is 1"/>
  194. <line text="@Annot(a=a, fred=false, value=abc)"/>
  195. </stdout>
  196. </run>
  197. </ajc-test>
  198. <ajc-test dir="bugs170/xmldefs" title="xml defined dec anno - multiple values and spaces">
  199. <compile files="Hello6.java Anno6.java" options="-1.5"/>
  200. <run class="Hello6" ltw="aop6a.xml">
  201. <stdout>
  202. <line text="Annotations on field1? true"/>
  203. <line text="Annotation count is 1"/>
  204. <line text="@Annot(a=a, fred=false, value=abc)"/>
  205. </stdout>
  206. </run>
  207. </ajc-test>
  208. <ajc-test dir="bugs170/xmldefs" title="xml defined dec anno - type">
  209. <compile files="Hello7.java Anno7.java" options="-1.5"/>
  210. <run class="Hello7" ltw="aop7.xml">
  211. <stdout>
  212. <line text="Annotations on Hello7? true"/>
  213. <line text="Annotation count is 1"/>
  214. <line text="@Anno"/>
  215. </stdout>
  216. </run>
  217. </ajc-test>
  218. <ajc-test dir="bugs170/pr371998" title="BCException anno decp">
  219. <compile files="AspectTest.java" options="-1.5 -showWeaveInfo">
  220. <message kind="weave" text="Extending interface set for type 'Foo' (AspectTest.java) to include 'X' (AspectTest.java)"/>
  221. <message kind="weave" text="Type 'Foo' (AspectTest.java) has intertyped method from 'AspectTest' (AspectTest.java:'void X.xxx()')"/>
  222. <message kind="weave" text="Extending interface set for type 'Bar' (AspectTest.java) to include 'X' (AspectTest.java)"/>
  223. <message kind="weave" text="Type 'Bar' (AspectTest.java) has intertyped method from 'AspectTest' (AspectTest.java:'void X.xxx()')"/>
  224. </compile>
  225. <run class="AspectTest"/>
  226. </ajc-test>
  227. <ajc-test dir="bugs170/transientTjpFields" title="transient tjp fields">
  228. <compile files="Code.java" options="-Xset:makeTjpFieldsTransient=true">
  229. </compile>
  230. </ajc-test>
  231. <ajc-test dir="bugs170/language" title="perthis">
  232. <compile files="PerThis.java" options="-1.7">
  233. </compile>
  234. </ajc-test>
  235. <ajc-test dir="bugs170/language" title="pertarget">
  236. <compile files="PerTarget.java" options="-1.7">
  237. </compile>
  238. </ajc-test>
  239. <ajc-test dir="bugs170/language" title="percflow">
  240. <compile files="PerCflow.java" options="-1.7">
  241. </compile>
  242. </ajc-test>
  243. <ajc-test dir="bugs170/language" title="pertypewithin">
  244. <compile files="PerTypeWithin.java" options="-1.7">
  245. </compile>
  246. </ajc-test>
  247. <ajc-test dir="bugs170/language" title="diamond 1">
  248. <compile files="Diamond.java" options="-1.5">
  249. <message kind="error" line="11" text="'&lt;&gt;' operator is not allowed for source level below 1.7"/>
  250. </compile>
  251. </ajc-test>
  252. <ajc-test dir="bugs170/language" title="diamond 2">
  253. <compile files="Diamond.java" options="-1.7">
  254. </compile>
  255. </ajc-test>
  256. <ajc-test dir="bugs170/language" title="diamond itd 1">
  257. <compile files="DiamondITD.java" options="-1.7">
  258. </compile>
  259. </ajc-test>
  260. <ajc-test dir="bugs170/language" title="literals 1">
  261. <compile files="Literals.java" options="-1.5">
  262. <message kind="error" line="8" text="Underscores can only be used with source level 1.7 or greater"/>
  263. </compile>
  264. </ajc-test>
  265. <ajc-test dir="bugs170/language" title="literals 2">
  266. <compile files="Literals.java" options="-1.7">
  267. </compile>
  268. </ajc-test>
  269. <ajc-test dir="bugs170/language" title="literals itd 1">
  270. <compile files="LiteralsITD.java" options="-1.7">
  271. </compile>
  272. </ajc-test>
  273. <ajc-test dir="bugs170/language" title="string switch 1">
  274. <compile files="StringSwitch.java" options="-1.5">
  275. <message kind="error" line="9" text="Cannot switch on a value of type String for source level below 1.7. Only convertible int values or enum variables are permitted"/>
  276. </compile>
  277. </ajc-test>
  278. <ajc-test dir="bugs170/language" title="string switch 2">
  279. <compile files="StringSwitch.java" options="-1.7">
  280. </compile>
  281. </ajc-test>
  282. <ajc-test dir="bugs170/language" title="multi catch 1">
  283. <compile files="MultiCatch.java" options="-1.5">
  284. <message kind="error" line="6" text="Multi-catch parameters are not allowed for source level below 1.7"/>
  285. </compile>
  286. </ajc-test>
  287. <ajc-test dir="bugs170/language" title="multi catch 2">
  288. <compile files="MultiCatch.java" options="-1.7">
  289. </compile>
  290. </ajc-test>
  291. <ajc-test dir="bugs170/language" title="multi catch with handler 1">
  292. <compile files="MultiCatchWithHandler.java" options="-1.7">
  293. </compile>
  294. </ajc-test>
  295. <ajc-test dir="bugs170/language" title="multi catch aspect 1">
  296. <compile files="MultiCatchAspect.java" options="-1.7">
  297. </compile>
  298. </ajc-test>
  299. <ajc-test dir="bugs170/language" title="try resources 1">
  300. <compile files="TryResources.java" options="-1.7">
  301. </compile>
  302. </ajc-test>
  303. <ajc-test dir="bugs170/language" title="try resources 2">
  304. <compile files="TryResourcesAspect.java" options="-1.7">
  305. </compile>
  306. </ajc-test>
  307. <ajc-test dir="bugs170/language" title="multi catch with handler 2">
  308. <compile files="MultiCatchWithHandler2.java" options="-1.7">
  309. </compile>
  310. <run class="MultiCatchWithHandler2"></run>
  311. </ajc-test>
  312. <ajc-test dir="bugs170/sanity" title="sanity 1">
  313. <compile files="DeclareAtType.java" options="-1.5">
  314. </compile>
  315. </ajc-test>
  316. <ajc-test dir="bugs170/pr363979" title="missing impl">
  317. <compile files="Example.java" options="-1.5"/>
  318. <run class="Example">
  319. <stdout>
  320. <line text="yes"/>
  321. </stdout>
  322. </run>
  323. </ajc-test>
  324. <ajc-test dir="bugs170/pr363979" title="missing impl 2">
  325. <compile files="Example2.java" options="-1.5"/>
  326. <run class="Example2">
  327. <stdout>
  328. <line text="yes"/>
  329. </stdout>
  330. </run>
  331. </ajc-test>
  332. <ajc-test dir="bugs170/pr364380" title="stackoverflow">
  333. <compile files="X.aj" options="-1.5" outjar="foo.jar"/>
  334. <compile files="C.java" options="-1.5" inpath="foo.jar">
  335. <message kind="warning" text="An advice already exists for setting an owner"/>
  336. </compile>
  337. </ajc-test>
  338. </suite>