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

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