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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  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)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
  163. <line text="@AnnoClass(value=java.lang.Integer.class, ccc=java.lang.String.class)" vm="9+"/>
  164. <line text="@AnnoLong(value=999, jjj=111)"/>
  165. <line text="@AnnoString(value=set from xml, sss=xyz)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
  166. <line text="@AnnoString(value=&quot;set from xml&quot;, sss=&quot;xyz&quot;)" vm="9+"/>
  167. <line text="Annotations on field2? true"/>
  168. <line text="Annotation count is 1"/>
  169. <line text="@AnnoClass(value=class java.lang.String, ccc=class java.lang.String)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
  170. <line text="@AnnoClass(value=java.lang.String.class, ccc=java.lang.String.class)" vm="9+"/>
  171. </stdout>
  172. </run>
  173. </ajc-test>
  174. <ajc-test dir="bugs170/xmldefs" title="xml defined dec anno - variants 2">
  175. <compile files="Hello5.java Anno5.java" options="-1.5"/>
  176. <run class="Hello5" ltw="aop5.xml">
  177. <stdout>
  178. <line text="Annotations on field1? true"/>
  179. <line text="Annotation count is 4"/>
  180. <line text="@AnnoChar(value=z, ccc=a)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
  181. <line text="@AnnoChar(value='z', ccc='a')" vm="9+"/>
  182. <line text="@AnnoDouble(value=99.0, ddd=3.0)"/>
  183. <line text="@AnnoFloat(value=6.0, fff=4.0)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
  184. <line text="@AnnoFloat(value=6.0f, fff=4.0f)" vm="9+"/>
  185. <line text="@AnnoShort(value=8, sss=3)"/>
  186. <line text="Annotations on field2? true"/>
  187. <line text="Annotation count is 2"/>
  188. <line text="@AnnoByte(value=88, bbb=66)"/>
  189. <line text="@AnnoInt(iii=111, value=99)"/>
  190. </stdout>
  191. </run>
  192. </ajc-test>
  193. <ajc-test dir="bugs170/xmldefs" title="xml defined dec anno - multiple values">
  194. <compile files="Hello6.java Anno6.java" options="-1.5"/>
  195. <run class="Hello6" ltw="aop6.xml">
  196. <stdout>
  197. <line text="Annotations on field1? true"/>
  198. <line text="Annotation count is 1"/>
  199. <line text="@Annot(a=a, fred=false, value=abc)" vm="1.2,1.3,1.4,1.5,1.6,1.7,1.8"/>
  200. <line text="@Annot(a='a', fred=false, value=&quot;abc&quot;)" vm="9+"/>
  201. </stdout>
  202. </run>
  203. </ajc-test>
  204. <ajc-test dir="bugs170/xmldefs" title="xml defined dec anno - multiple values and spaces">
  205. <compile files="Hello6.java Anno6.java" options="-1.5"/>
  206. <run class="Hello6" ltw="aop6a.xml">
  207. <stdout>
  208. <line text="Annotations on field1? true"/>
  209. <line text="Annotation count is 1"/>
  210. <line text="@Annot(a=a, fred=false, value=abc)" vm="1.4,1.5,1.6,1.7,1.8"/>
  211. <line text="@Annot(a='a', fred=false, value=&quot;abc&quot;)" vm="9+"/>
  212. </stdout>
  213. </run>
  214. </ajc-test>
  215. <ajc-test dir="bugs170/xmldefs" title="xml defined dec anno - type">
  216. <compile files="Hello7.java Anno7.java" options="-1.5"/>
  217. <run class="Hello7" ltw="aop7.xml">
  218. <stdout>
  219. <line text="Annotations on Hello7? true"/>
  220. <line text="Annotation count is 1"/>
  221. <line text="@Anno"/>
  222. </stdout>
  223. </run>
  224. </ajc-test>
  225. <ajc-test dir="bugs170/pr371998" title="BCException anno decp">
  226. <compile files="AspectTest.java" options="-1.5 -showWeaveInfo">
  227. <message kind="weave" text="Extending interface set for type 'Foo' (AspectTest.java) to include 'X' (AspectTest.java)"/>
  228. <message kind="weave" text="Type 'Foo' (AspectTest.java) has intertyped method from 'AspectTest' (AspectTest.java:'void X.xxx()')"/>
  229. <message kind="weave" text="Extending interface set for type 'Bar' (AspectTest.java) to include 'X' (AspectTest.java)"/>
  230. <message kind="weave" text="Type 'Bar' (AspectTest.java) has intertyped method from 'AspectTest' (AspectTest.java:'void X.xxx()')"/>
  231. </compile>
  232. <run class="AspectTest"/>
  233. </ajc-test>
  234. <ajc-test dir="bugs170/transientTjpFields" title="transient tjp fields">
  235. <compile files="Code.java" options="-Xset:makeTjpFieldsTransient=true">
  236. </compile>
  237. </ajc-test>
  238. <ajc-test dir="bugs170/language" title="perthis">
  239. <compile files="PerThis.java" options="-1.7">
  240. </compile>
  241. </ajc-test>
  242. <ajc-test dir="bugs170/language" title="pertarget">
  243. <compile files="PerTarget.java" options="-1.7">
  244. </compile>
  245. </ajc-test>
  246. <ajc-test dir="bugs170/language" title="percflow">
  247. <compile files="PerCflow.java" options="-1.7">
  248. </compile>
  249. </ajc-test>
  250. <ajc-test dir="bugs170/language" title="pertypewithin">
  251. <compile files="PerTypeWithin.java" options="-1.7">
  252. </compile>
  253. </ajc-test>
  254. <ajc-test dir="bugs170/language" title="diamond 1">
  255. <compile files="Diamond.java" options="-1.5">
  256. <message kind="error" line="11" text="'&lt;&gt;' operator is not allowed for source level below 1.7"/>
  257. </compile>
  258. </ajc-test>
  259. <ajc-test dir="bugs170/language" title="diamond 2">
  260. <compile files="Diamond.java" options="-1.7">
  261. </compile>
  262. </ajc-test>
  263. <ajc-test dir="bugs170/language" title="diamond itd 1">
  264. <compile files="DiamondITD.java" options="-1.7">
  265. </compile>
  266. </ajc-test>
  267. <ajc-test dir="bugs170/language" title="literals 1">
  268. <compile files="Literals.java" options="-1.5">
  269. <message kind="error" line="8" text="Underscores can only be used with source level 1.7 or greater"/>
  270. </compile>
  271. </ajc-test>
  272. <ajc-test dir="bugs170/language" title="literals 2">
  273. <compile files="Literals.java" options="-1.7">
  274. </compile>
  275. </ajc-test>
  276. <ajc-test dir="bugs170/language" title="literals itd 1">
  277. <compile files="LiteralsITD.java" options="-1.7">
  278. </compile>
  279. </ajc-test>
  280. <ajc-test dir="bugs170/language" title="string switch 1">
  281. <compile files="StringSwitch.java" options="-1.5">
  282. <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"/>
  283. </compile>
  284. </ajc-test>
  285. <ajc-test dir="bugs170/language" title="string switch 2">
  286. <compile files="StringSwitch.java" options="-1.7">
  287. </compile>
  288. </ajc-test>
  289. <ajc-test dir="bugs170/language" title="multi catch 1">
  290. <compile files="MultiCatch.java" options="-1.5">
  291. <message kind="error" line="6" text="Multi-catch parameters are not allowed for source level below 1.7"/>
  292. </compile>
  293. </ajc-test>
  294. <ajc-test dir="bugs170/language" title="multi catch 2">
  295. <compile files="MultiCatch.java" options="-1.7">
  296. </compile>
  297. </ajc-test>
  298. <ajc-test dir="bugs170/language" title="multi catch with handler 1">
  299. <compile files="MultiCatchWithHandler.java" options="-1.7">
  300. </compile>
  301. </ajc-test>
  302. <ajc-test dir="bugs170/language" title="multi catch aspect 1">
  303. <compile files="MultiCatchAspect.java" options="-1.7">
  304. </compile>
  305. </ajc-test>
  306. <ajc-test dir="bugs170/language" title="try resources 1">
  307. <compile files="TryResources.java" options="-1.7">
  308. </compile>
  309. </ajc-test>
  310. <ajc-test dir="bugs170/language" title="try resources 2">
  311. <compile files="TryResourcesAspect.java" options="-1.7">
  312. </compile>
  313. </ajc-test>
  314. <ajc-test dir="bugs170/language" title="multi catch with handler 2">
  315. <compile files="MultiCatchWithHandler2.java" options="-1.7">
  316. </compile>
  317. <run class="MultiCatchWithHandler2"></run>
  318. </ajc-test>
  319. <ajc-test dir="bugs170/sanity" title="sanity 1">
  320. <compile files="DeclareAtType.java" options="-1.5">
  321. </compile>
  322. </ajc-test>
  323. <ajc-test dir="bugs170/pr363979" title="missing impl">
  324. <compile files="Example.java" options="-1.5"/>
  325. <run class="Example">
  326. <stdout>
  327. <line text="yes"/>
  328. </stdout>
  329. </run>
  330. </ajc-test>
  331. <ajc-test dir="bugs170/pr363979" title="missing impl 2">
  332. <compile files="Example2.java" options="-1.5"/>
  333. <run class="Example2">
  334. <stdout>
  335. <line text="yes"/>
  336. </stdout>
  337. </run>
  338. </ajc-test>
  339. <ajc-test dir="bugs170/pr364380" title="stackoverflow">
  340. <compile files="X.aj" options="-1.5" outjar="foo.jar"/>
  341. <compile files="C.java" options="-1.5" inpath="foo.jar">
  342. <message kind="warning" text="An advice already exists for setting an owner"/>
  343. </compile>
  344. </ajc-test>
  345. </suite>