Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

ajc150.xml 57KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[
  2. ]>
  3. <!-- AspectJ v1.5.0 Tests -->
  4. <suite>
  5. <ajc-test dir="java5/bridgeMethods" pr="72766" title="Ignore bridge methods">
  6. <compile files="AspectX.aj" inpath="testcode.jar" options="-showWeaveInfo">
  7. <message kind="warning" line="7" text="pointcut did not match on the method call to a bridge method."/>
  8. <message kind="weave" text="(AspectX.aj:18) advised by before advice from 'AspectX'"/>
  9. <message kind="weave" text="(Number.java:5) advised by before advice from 'AspectX'"/>
  10. </compile>
  11. </ajc-test>
  12. <ajc-test dir="migration" title="load aspectj 1.2.1 aspects in aspectj 5">
  13. <compile files="Program.java" aspectpath="aspects121.jar">
  14. </compile>
  15. <run class="Program"/>
  16. </ajc-test>
  17. <ajc-test dir="bugs/java5/arrayCloning" pr="72150" vm="1.5"
  18. title="AJC possible bug with static nested classes">
  19. <compile files="A.java,C.java" options="-1.5,-showWeaveInfo">
  20. <message kind="weave" text="Type 'C' (C.java:14) advised by around advice from 'A' (A.java:2)"/>
  21. </compile>
  22. <run class="C"/>
  23. </ajc-test>
  24. <ajc-test dir="java5/pseudoKeywords"
  25. title="method called around in class">
  26. <compile files="MethodCalledAround.java">
  27. </compile>
  28. </ajc-test>
  29. <ajc-test dir="java5/pseudoKeywords"
  30. title="method called around in aspect">
  31. <compile files="MethodCalledAroundAspect.java">
  32. <message kind="error" line="2"/>
  33. </compile>
  34. </ajc-test>
  35. <ajc-test dir="decp" pr="80249" title="Order of types passed to compiler determines weaving behavior">
  36. <compile files="A.java,B.java,AspectX.java"/>
  37. <run class="B"/>
  38. <compile files="B.java,A.java,AspectX.java"/>
  39. <run class="B"/>
  40. </ajc-test>
  41. <ajc-test dir="bugs" pr="61568" title="Various kinds of ambiguous bindings">
  42. <compile files="AmbiguousBindings.aj">
  43. <message line="17" text="ambiguous binding of parameter(s) foo across '||' in pointcut"></message>
  44. <message line="19" text="ambiguous binding of parameter(s) foo across '||' in pointcut"></message>
  45. <message line="21" text="ambiguous binding of parameter(s) foo across '||' in pointcut"></message>
  46. <message line="23" text="ambiguous binding of parameter(s) x across '||' in pointcut"></message>
  47. <message line="25" text="ambiguous binding of parameter(s) foo across '||' in pointcut"></message>
  48. </compile>
  49. </ajc-test>
  50. <ajc-test dir="bugs" pr="61658" title="ambiguous args">
  51. <compile files="PR61658.java">
  52. <message line="17" text="ambiguous binding of parameter(s) a, b across '||' in pointcut"></message>
  53. </compile>
  54. </ajc-test>
  55. <ajc-test dir="bugs150" pr="78021" title="Injecting exception into while loop with break statement causes catch block to be ignored">
  56. <compile files="PR78021.java"/>
  57. <run class="PR78021"/>
  58. </ajc-test>
  59. <ajc-test dir="bugs150" pr="79554" title="Return in try-block disables catch-block if final-block is present">
  60. <compile files="PR79554.java"/>
  61. <run class="PR79554"/>
  62. </ajc-test>
  63. <ajc-test dir="bugs150" pr="82570" title="Weaved code does not include debug lines">
  64. <compile files="PR82570_1.java"/>
  65. </ajc-test>
  66. <ajc-test dir="bugs150" pr="83303" title="compiler error when mixing inheritance, overriding and polymorphism">
  67. <compile files="PR83303.java"/>
  68. </ajc-test>
  69. <ajc-test dir="bugs150" pr="83563" title="pertypewithin() handing of inner classes (1)">
  70. <compile files="PR83563_1.java"/>
  71. <run class="PR83563_1"/>
  72. </ajc-test>
  73. <ajc-test dir="bugs150" pr="83563" title="pertypewithin() handing of inner classes (2)">
  74. <compile files="PR83563_2.java"/>
  75. <run class="PR83563_2"/>
  76. </ajc-test>
  77. <ajc-test dir="bugs150" pr="83645" title="pertypewithin({interface}) illegal field modifier">
  78. <compile files="PR83645.java"/>
  79. <run class="PR83645"/>
  80. </ajc-test>
  81. <ajc-test dir="bugs150" title="bad asm for enums" vm="1.5">
  82. <compile files="Rainbow.java" options="-emacssym,-1.5"/>
  83. </ajc-test>
  84. <!-- Annotation binding tests -->
  85. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 1">
  86. <compile files="CallAnnBinding.aj" options="-1.5"/>
  87. <run class="CallAnnBinding"/>
  88. </ajc-test>
  89. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 2">
  90. <compile files="CallAnnBinding2.aj" options="-1.5"/>
  91. <run class="CallAnnBinding2"/>
  92. </ajc-test>
  93. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 3">
  94. <compile files="CallAnnBinding3.aj" options="-1.5"/>
  95. <run class="CallAnnBinding3"/>
  96. </ajc-test>
  97. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 4">
  98. <compile files="CallAnnBinding4.aj" options="-1.5"/>
  99. <run class="CallAnnBinding4"/>
  100. </ajc-test>
  101. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 5">
  102. <compile files="CallAnnBinding5.aj" options="-1.5"/>
  103. <run class="CallAnnBinding5"/>
  104. </ajc-test>
  105. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 6">
  106. <compile files="CallAnnBinding6.aj" options="-1.5"/>
  107. <run class="CallAnnBinding6"/>
  108. </ajc-test>
  109. <ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 7">
  110. <compile files="CallAnnBinding7.aj" options="-1.5"/>
  111. <run class="CallAnnBinding7"/>
  112. </ajc-test>
  113. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@target annotation binding 1">
  114. <compile files="AtTarget1.aj" options="-1.5"/>
  115. <run class="AtTarget1"/>
  116. </ajc-test>
  117. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@target annotation binding 2">
  118. <compile files="AtTarget2.aj" options="-1.5"/>
  119. <run class="AtTarget2"/>
  120. </ajc-test>
  121. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@target annotation binding 3">
  122. <compile files="AtTarget3.aj" options="-1.5"/>
  123. <run class="AtTarget3"/>
  124. </ajc-test>
  125. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@target annotation binding 4">
  126. <compile files="AtTarget4.aj" options="-1.5"/>
  127. <run class="AtTarget4"/>
  128. </ajc-test>
  129. <ajc-test dir="java5/annotations/binding/usingPackageNames" vm="1.5" title="@target annotation binding 5">
  130. <compile files="MyAspect.aj,MyAnnotation.java,MyClass.java" options="-1.5"/>
  131. <run class="test.MyClass"/>
  132. </ajc-test>
  133. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@this annotation binding 1">
  134. <compile files="AtThis1.aj" options="-1.5"/>
  135. <run class="AtThis1"/>
  136. </ajc-test>
  137. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@this annotation binding 2">
  138. <compile files="AtThis2.aj" options="-1.5"/>
  139. <run class="AtThis2"/>
  140. </ajc-test>
  141. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@this annotation binding 3">
  142. <compile files="AtThis3.aj" options="-1.5"/>
  143. <run class="AtThis3"/>
  144. </ajc-test>
  145. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@this annotation binding 4">
  146. <compile files="AtThis4.aj" options="-1.5"/>
  147. <run class="AtThis4"/>
  148. </ajc-test>
  149. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@this annotation binding 5">
  150. <compile files="AtThis5.aj" options="-1.5"/>
  151. <run class="AtThis5"/>
  152. </ajc-test>
  153. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@args annotation binding 1">
  154. <compile files="AtArgs1.aj" options="-1.5"/>
  155. <run class="AtArgs1"/>
  156. </ajc-test>
  157. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@args annotation binding 2">
  158. <compile files="AtArgs2.aj" options="-1.5"/>
  159. <run class="AtArgs2"/>
  160. </ajc-test>
  161. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@args annotation binding 3">
  162. <compile files="AtArgs3.aj" options="-1.5"/>
  163. <run class="AtArgs3"/>
  164. </ajc-test>
  165. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@args annotation binding 4">
  166. <compile files="AtArgs4.aj" options="-1.5"/>
  167. <run class="AtArgs4"/>
  168. </ajc-test>
  169. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@args annotation binding 5">
  170. <compile files="AtArgs5.aj" options="-1.5"/>
  171. <run class="AtArgs5"/>
  172. </ajc-test>
  173. <ajc-test dir="java5/annotations/binding" vm="1.5" title="execution and @annotation">
  174. <compile files="ExecutionAnnBinding1.aj" options="-1.5"/>
  175. <run class="ExecutionAnnBinding1"/>
  176. </ajc-test>
  177. <ajc-test dir="java5/annotations/binding" vm="1.5" title="set and @annotation">
  178. <compile files="FieldAnnBinding1.aj" options="-1.5"/>
  179. <run class="FieldAnnBinding1"/>
  180. </ajc-test>
  181. <ajc-test dir="java5/annotations/binding" vm="1.5" title="get and @annotation">
  182. <compile files="FieldAnnBinding2.aj" options="-1.5"/>
  183. <run class="FieldAnnBinding2"/>
  184. </ajc-test>
  185. <ajc-test dir="java5/annotations/binding" vm="1.5" title="get and @annotation with arrays">
  186. <compile files="FieldAnnBinding3.aj" options="-1.5"/>
  187. <run class="FieldAnnBinding3"/>
  188. </ajc-test>
  189. <ajc-test dir="java5/annotations/binding" vm="1.5" title="cons call and @annotation">
  190. <compile files="CtorAnnBinding1.aj" options="-1.5"/>
  191. <run class="CtorAnnBinding1"/>
  192. </ajc-test>
  193. <ajc-test dir="java5/annotations/binding" vm="1.5" title="cons exe and @annotation">
  194. <compile files="CtorAnnBinding2.aj" options="-1.5"/>
  195. <run class="CtorAnnBinding2"/>
  196. </ajc-test>
  197. <ajc-test dir="java5/annotations/binding" vm="1.5" title="staticinit and @annotation">
  198. <compile files="StaticInitBinding.aj" options="-1.5"/>
  199. <run class="StaticInitBinding"/>
  200. </ajc-test>
  201. <ajc-test dir="java5/annotations/binding" vm="1.5" title="preinit and @annotation">
  202. <compile files="PreInitBinding.aj" options="-1.5"/>
  203. <run class="PreInitBinding"/>
  204. </ajc-test>
  205. <ajc-test dir="java5/annotations/binding" vm="1.5" title="init and @annotation">
  206. <compile files="InitBinding.aj" options="-1.5"/>
  207. <run class="InitBinding"/>
  208. </ajc-test>
  209. <ajc-test dir="java5/annotations/binding" vm="1.5" title="adviceexecution and @annotation">
  210. <compile files="AdviceExecBinding.aj" options="-1.5"/>
  211. <run class="AdviceExecBinding"/>
  212. </ajc-test>
  213. <ajc-test dir="java5/annotations/binding" vm="1.5" title="handler and @annotation">
  214. <compile files="HandlerBinding.aj" options="-1.5"/>
  215. <run class="HandlerBinding"/>
  216. </ajc-test>
  217. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@withincode() and call(* println(..))">
  218. <compile files="WithinCodeBinding1.aj" options="-1.5"/>
  219. <run class="WithinCodeBinding1"/>
  220. </ajc-test>
  221. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@within">
  222. <compile files="WithinBinding1.aj" options="-1.5"/>
  223. <run class="WithinBinding1"/>
  224. </ajc-test>
  225. <ajc-test dir="java5/annotations/binding" vm="1.5" title="@within - multiple types">
  226. <compile files="WithinBinding2.aj" options="-1.5"/>
  227. <run class="WithinBinding2"/>
  228. </ajc-test>
  229. <ajc-test dir="java5/annotations/binding/complexExample" vm="1.5" title="packages and no binding">
  230. <compile files="A.java,B.java,Color.java,X.java" options="-1.5"/>
  231. <run class="a.b.c.A"/>
  232. </ajc-test>
  233. <ajc-test dir="java5/annotations/binding/complexExample" vm="1.5" title="packages and binding">
  234. <compile files="A.java,B.java,Color.java,X2.java" options="-1.5"/>
  235. <run class="a.b.c.A"/>
  236. </ajc-test>
  237. <ajc-test dir="java5/annotations/binding" vm="1.5" title="binding with static methods">
  238. <compile files="StaticMethods.java" options="-1.5"/>
  239. <run class="StaticMethods"/>
  240. </ajc-test>
  241. <ajc-test dir="java5/annotations" vm="1.5" title="annotation matching on call">
  242. <weave classesFiles="AnnotatedType.java,SimpleAnnotation.java,SimpleAnnotation2.java"
  243. aspectsFiles="AnnotationAspect02.aj"
  244. options="-1.5,-showWeaveInfo">
  245. <message kind="weave" text="Type 'AnnotatedType' (AnnotatedType.java:3) advised by before advice from 'AnnotationAspect02' (AnnotationAspect02.aj:4)"/>
  246. <message kind="weave" text="Type 'AnnotatedType' (AnnotatedType.java:3) advised by before advice from 'AnnotationAspect02' (AnnotationAspect02.aj:2)"/>
  247. <message kind="weave" text="Type 'AnnotatedType' (AnnotatedType.java:4) advised by before advice from 'AnnotationAspect02' (AnnotationAspect02.aj:4)"/>
  248. </weave>
  249. </ajc-test>
  250. <ajc-test dir="java5/annotations" vm="1.5" title="at annotation matching">
  251. <weave classesFiles="AnnotatedType.java,SimpleAnnotation.java,SimpleAnnotation2.java"
  252. aspectsFiles="AnnotationAspect03.aj"
  253. options="-1.5,-showWeaveInfo">
  254. <message kind="warning" line="8" text="@annotation matched here"/>
  255. </weave>
  256. </ajc-test>
  257. <ajc-test dir="java5/annotations/within_code" vm="1.5" title="annotations and within(code)">
  258. <weave classesFiles="TestingAnnotations.java"
  259. aspectsFiles="WithinAndWithinCodeTests.java"
  260. options="-1.5,-showWeaveInfo">
  261. <message kind="warning" line="31" text="@within match on non-inherited annotation"/>
  262. <message kind="warning" line="39" text="@within match on non-inherited annotation"/>
  263. <message kind="warning" line="39" text="@within match on inheritable annotation"/>
  264. <message kind="warning" line="43" text="@within match on inheritable annotation"/>
  265. <message kind="warning" line="32" text="@withincode match"/>
  266. </weave>
  267. </ajc-test>
  268. <ajc-test dir="java5/annotations/within" vm="1.5" title="annotations and within">
  269. <weave classesFiles="PlainWithin.java"
  270. aspectsFiles="PlainWithinTests.java"
  271. options="-1.5,-showWeaveInfo">
  272. <message kind="warning" line="21" text="positive within match on annotation"/>
  273. <message kind="warning" line="25" text="negative within match on annotation"/>
  274. </weave>
  275. </ajc-test>
  276. <ajc-test dir="java5/annotations/thisOrtarget" vm="1.5" title="must have runtime retention">
  277. <compile options="-1.5" files="TestingAnnotations.java,NotRuntimeRetention.aj">
  278. <message kind="error" line="7" text="Annotation type MyClassRetentionAnnotation does not have runtime retention"/>
  279. <message kind="error" line="13" text="Annotation type MyClassRetentionAnnotation does not have runtime retention"/>
  280. </compile>
  281. </ajc-test>
  282. <ajc-test dir="java5/annotations/thisOrtarget" vm="1.5" title="inheritable or not">
  283. <compile options="-1.5" files="TestingAnnotations.java,ThisOrTargetTests.aj">
  284. </compile>
  285. <run class="TestingAnnotations"/>
  286. </ajc-test>
  287. <ajc-test dir="java5/annotations/thisOrtarget" vm="1.5" title="use of @this/target in deow">
  288. <compile options="-1.5" files="TestingAnnotations.java,DeclareEoW.java">
  289. <message kind="error" line="3" text="this() pointcut designator cannot be used in declare statement"/>
  290. <message kind="error" line="5" text="target() pointcut designator cannot be used in declare statement"/>
  291. </compile>
  292. </ajc-test>
  293. <ajc-test dir="java5/annotations/args" vm="1.5" title="@args tests">
  294. <compile options="-1.5" files="TestingArgsAnnotations.java,AtArgsAspect.java">
  295. </compile>
  296. <run class="TestingArgsAnnotations"/>
  297. </ajc-test>
  298. <ajc-test dir="java5/annotations/args" vm="1.5" title="use of @args in deow">
  299. <compile options="-1.5" files="TestingArgsAnnotations.java,DeclareEoW.java">
  300. <message kind="error" line="3" text="args() pointcut designator cannot be used in declare statement"/>
  301. </compile>
  302. </ajc-test>
  303. <ajc-test dir="java5/annotations" vm="1.5" title="compiling an annotation">
  304. <compile options="-1.5" files="SimpleAnnotation.java">
  305. </compile>
  306. </ajc-test>
  307. <ajc-test dir="java5/annotations" vm="1.5" title="compiling annotated file">
  308. <compile options="-1.5" files="SimpleAnnotation.java,AnnotatedType.java">
  309. </compile>
  310. </ajc-test>
  311. <ajc-test dir="java5/annotations/within" vm="1.5" title="annotations and within (src)">
  312. <compile files="PlainWithin.java,PlainWithinTests.java"
  313. aspectsFiles="PlainWithinTests.java"
  314. options="-1.5">
  315. <message kind="warning" line="21" text="positive within match on annotation"/>
  316. <message kind="warning" line="25" text="negative within match on annotation"/>
  317. </compile>
  318. </ajc-test>
  319. <ajc-test dir="java5/annotations/attarget" vm="1.5" title="losing annotations...">
  320. <compile options="-1.5" files="Program.java,AtTargetAspect.java">
  321. </compile>
  322. </ajc-test>
  323. <ajc-test dir="java5/annotations" vm="1.5" title="no itds on annotation types">
  324. <compile files="AnnotatedType.java,SimpleAnnotation.java,SimpleAnnotation2.java,AnnotationAspect01.aj"
  325. options="-1.5">
  326. <message kind="error" line="4" text="can't make inter-type constructor declarations"/>
  327. <message kind="error" line="8" text="can't make inter-type method declarations"/>
  328. <message kind="error" line="13" text="can't make inter-type field declarations"/>
  329. </compile>
  330. </ajc-test>
  331. <ajc-test dir="java5/annotations" vm="1.5" title="no declare parents on annotation types">
  332. <compile files="AnnotatedType.java,SimpleAnnotation.java,SimpleAnnotation2.java,AnnotationAspect04.aj"
  333. options="-1.5">
  334. <message kind="error" line="7" text="can't use declare parents to alter supertype of annotation type SimpleAnnotation"/>
  335. <message kind="error" line="10" text="can't use declare parents to make 'java.lang.annotation.Annotation' the parent of type"/>
  336. <message kind="error" line="4" text="can't use declare parents to make annotation type SimpleAnnotation implement an interface"/>
  337. </compile>
  338. </ajc-test>
  339. <ajc-test dir="java5/annotations" vm="1.5" title="declare parents wildcards matching annotation types">
  340. <compile files="AnnotatedType.java,SimpleAnnotation.java,SimpleAnnotation2.java,AnnotationAspect05.aj"
  341. options="-1.5">
  342. <message kind="warning" line="4" text="annotation type SimpleAnnotation2 matches a declare parents type pattern but is being ignored"/>
  343. <message kind="warning" line="4" text="annotation type SimpleAnnotation matches a declare parents type pattern but is being ignored"/>
  344. </compile>
  345. </ajc-test>
  346. <ajc-test dir="java5/annotations/binding/complexExample" vm="1.5" title="annotated any pattern">
  347. <compile files="A.java,B.java,C.java,Color.java,X3.java"
  348. options="-1.5">
  349. </compile>
  350. <run class="g.h.i.C"/>
  351. <run class="a.b.c.A"/>
  352. </ajc-test>
  353. <ajc-test dir="java5/annotations/binding/complexExample" vm="1.5" title="annotation not imported">
  354. <compile files="A.java,B.java,C.java,Color.java,X4.java"
  355. options="-1.5">
  356. <message kind="warning" line="6" text="no match for this type name: Color"/>
  357. </compile>
  358. <run class="a.b.c.A"/>
  359. </ajc-test>
  360. <!-- ======================================================================================= -->
  361. <!-- Autoboxing tests -->
  362. <!-- ======================================================================================= -->
  363. <ajc-test dir="java5/autoboxing" vm="1.5" title="simple boxing test">
  364. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,SimpleAutoboxingAspect.aj"
  365. options="-1.5,-showWeaveInfo">
  366. <message kind="weave" text="Type 'SimpleAutoboxing' (SimpleAutoboxing.java:7) advised by before advice from 'SimpleAutoboxingAspect' (SimpleAutoboxingAspect.aj:8)"/>
  367. <message kind="weave" text="Type 'SimpleAutoboxing' (SimpleAutoboxing.java:7) advised by before advice from 'SimpleAutoboxingAspect' (SimpleAutoboxingAspect.aj:4)"/>
  368. </compile>
  369. <run class="SimpleAutoboxing">
  370. <stderr>
  371. <line text="Matching by Integer:20000"/>
  372. <line text="Matching by int:20000"/>
  373. <line text="method_takes_Integer=20000"/>
  374. </stderr>
  375. </run>
  376. </ajc-test>
  377. <ajc-test dir="java5/autoboxing" vm="1.5" title="integer boxing">
  378. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectInteger.aj"
  379. options="-1.5,-showWeaveInfo">
  380. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:11) advised by before advice from 'AspectInteger' (AspectInteger.aj:8)"/>
  381. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:11) advised by before advice from 'AspectInteger' (AspectInteger.aj:4)"/>
  382. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:12) advised by before advice from 'AspectInteger' (AspectInteger.aj:8)"/>
  383. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:12) advised by before advice from 'AspectInteger' (AspectInteger.aj:4)"/>
  384. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:13) advised by before advice from 'AspectInteger' (AspectInteger.aj:8)"/>
  385. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:13) advised by before advice from 'AspectInteger' (AspectInteger.aj:4)"/>
  386. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:14) advised by before advice from 'AspectInteger' (AspectInteger.aj:8)"/>
  387. <message kind="weave" text="Type 'AutoboxingI' (AutoboxingI.java:14) advised by before advice from 'AspectInteger' (AspectInteger.aj:4)"/>
  388. </compile>
  389. <run class="AutoboxingI">
  390. <stderr>
  391. <line text="Matching by Integer:10000"/>
  392. <line text="Matching by int:10000"/>
  393. <line text="method_takes_Integer=10000"/>
  394. <line text="Matching by Integer:20000"/>
  395. <line text="Matching by int:20000"/>
  396. <line text="method_takes_Integer=20000"/>
  397. <line text="Matching by Integer:30000"/>
  398. <line text="Matching by int:30000"/>
  399. <line text="method_takes_int=30000"/>
  400. <line text="Matching by Integer:40000"/>
  401. <line text="Matching by int:40000"/>
  402. <line text="method_takes_int=40000"/>
  403. </stderr>
  404. </run>
  405. </ajc-test>
  406. <ajc-test dir="java5/autoboxing" vm="1.5" title="char boxing">
  407. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectChar.aj"
  408. options="-1.5,-showWeaveInfo">
  409. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:11) advised by before advice from 'AspectChar' (AspectChar.aj:8)"/>
  410. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:11) advised by before advice from 'AspectChar' (AspectChar.aj:4)"/>
  411. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:12) advised by before advice from 'AspectChar' (AspectChar.aj:8)"/>
  412. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:12) advised by before advice from 'AspectChar' (AspectChar.aj:4)"/>
  413. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:13) advised by before advice from 'AspectChar' (AspectChar.aj:8)"/>
  414. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:13) advised by before advice from 'AspectChar' (AspectChar.aj:4)"/>
  415. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:14) advised by before advice from 'AspectChar' (AspectChar.aj:8)"/>
  416. <message kind="weave" text="Type 'AutoboxingC' (AutoboxingC.java:14) advised by before advice from 'AspectChar' (AspectChar.aj:4)"/>
  417. </compile>
  418. <run class="AutoboxingC">
  419. <stderr>
  420. <line text="Character:1"/>
  421. <line text="char:1"/>
  422. <line text="method_takes_Character=1"/>
  423. <line text="Character:2"/>
  424. <line text="char:2"/>
  425. <line text="method_takes_Character=2"/>
  426. <line text="Character:3"/>
  427. <line text="char:3"/>
  428. <line text="method_takes_char=3"/>
  429. <line text="Character:4"/>
  430. <line text="char:4"/>
  431. <line text="method_takes_char=4"/>
  432. </stderr>
  433. </run>
  434. </ajc-test>
  435. <ajc-test dir="java5/autoboxing" vm="1.5" title="double boxing">
  436. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectDouble.aj"
  437. options="-1.5,-showWeaveInfo">
  438. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:11) advised by before advice from 'AspectDouble' (AspectDouble.aj:8)"/>
  439. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:11) advised by before advice from 'AspectDouble' (AspectDouble.aj:4)"/>
  440. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:12) advised by before advice from 'AspectDouble' (AspectDouble.aj:8)"/>
  441. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:12) advised by before advice from 'AspectDouble' (AspectDouble.aj:4)"/>
  442. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:13) advised by before advice from 'AspectDouble' (AspectDouble.aj:8)"/>
  443. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:13) advised by before advice from 'AspectDouble' (AspectDouble.aj:4)"/>
  444. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:14) advised by before advice from 'AspectDouble' (AspectDouble.aj:8)"/>
  445. <message kind="weave" text="Type 'AutoboxingD' (AutoboxingD.java:14) advised by before advice from 'AspectDouble' (AspectDouble.aj:4)"/>
  446. </compile>
  447. <run class="AutoboxingD">
  448. <stderr>
  449. <line text="Double:100.0"/>
  450. <line text="double:100.0"/>
  451. <line text="method_takes_Double=100.0"/>
  452. <line text="Double:200.0"/>
  453. <line text="double:200.0"/>
  454. <line text="method_takes_Double=200.0"/>
  455. <line text="Double:300.0"/>
  456. <line text="double:300.0"/>
  457. <line text="method_takes_double=300.0"/>
  458. <line text="Double:400.0"/>
  459. <line text="double:400.0"/>
  460. <line text="method_takes_double=400.0"/>
  461. </stderr>
  462. </run>
  463. </ajc-test>
  464. <ajc-test dir="java5/autoboxing" vm="1.5" title="float boxing">
  465. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectFloat.aj"
  466. options="-1.5,-showWeaveInfo">
  467. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:11) advised by before advice from 'AspectFloat' (AspectFloat.aj:8)"/>
  468. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:11) advised by before advice from 'AspectFloat' (AspectFloat.aj:4)"/>
  469. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:12) advised by before advice from 'AspectFloat' (AspectFloat.aj:8)"/>
  470. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:12) advised by before advice from 'AspectFloat' (AspectFloat.aj:4)"/>
  471. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:13) advised by before advice from 'AspectFloat' (AspectFloat.aj:8)"/>
  472. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:13) advised by before advice from 'AspectFloat' (AspectFloat.aj:4)"/>
  473. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:14) advised by before advice from 'AspectFloat' (AspectFloat.aj:8)"/>
  474. <message kind="weave" text="Type 'AutoboxingF' (AutoboxingF.java:14) advised by before advice from 'AspectFloat' (AspectFloat.aj:4)"/>
  475. </compile>
  476. <run class="AutoboxingF">
  477. <stderr>
  478. <line text="Float:100.0"/>
  479. <line text="float:100.0"/>
  480. <line text="method_takes_Float=100.0"/>
  481. <line text="Float:200.0"/>
  482. <line text="float:200.0"/>
  483. <line text="method_takes_Float=200.0"/>
  484. <line text="Float:300.0"/>
  485. <line text="float:300.0"/>
  486. <line text="method_takes_float=300.0"/>
  487. <line text="Float:400.0"/>
  488. <line text="float:400.0"/>
  489. <line text="method_takes_float=400.0"/>
  490. </stderr>
  491. </run>
  492. </ajc-test>
  493. <ajc-test dir="java5/autoboxing" vm="1.5" title="short boxing">
  494. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectShort.aj"
  495. options="-1.5,-showWeaveInfo">
  496. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:11) advised by before advice from 'AspectShort' (AspectShort.aj:8)"/>
  497. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:11) advised by before advice from 'AspectShort' (AspectShort.aj:4)"/>
  498. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:12) advised by before advice from 'AspectShort' (AspectShort.aj:8)"/>
  499. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:12) advised by before advice from 'AspectShort' (AspectShort.aj:4)"/>
  500. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:13) advised by before advice from 'AspectShort' (AspectShort.aj:8)"/>
  501. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:13) advised by before advice from 'AspectShort' (AspectShort.aj:4)"/>
  502. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:14) advised by before advice from 'AspectShort' (AspectShort.aj:8)"/>
  503. <message kind="weave" text="Type 'AutoboxingS' (AutoboxingS.java:14) advised by before advice from 'AspectShort' (AspectShort.aj:4)"/>
  504. </compile>
  505. <run class="AutoboxingS">
  506. <stderr>
  507. <line text="Short:100"/>
  508. <line text="short:100"/>
  509. <line text="method_takes_Short=100"/>
  510. <line text="Short:200"/>
  511. <line text="short:200"/>
  512. <line text="method_takes_Short=200"/>
  513. <line text="Short:300"/>
  514. <line text="short:300"/>
  515. <line text="method_takes_short=300"/>
  516. <line text="Short:400"/>
  517. <line text="short:400"/>
  518. <line text="method_takes_short=400"/>
  519. </stderr>
  520. </run>
  521. </ajc-test>
  522. <ajc-test dir="java5/autoboxing" vm="1.5" title="long boxing">
  523. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectLong.aj"
  524. options="-1.5,-showWeaveInfo">
  525. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:11) advised by before advice from 'AspectLong' (AspectLong.aj:8)"/>
  526. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:11) advised by before advice from 'AspectLong' (AspectLong.aj:4)"/>
  527. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:12) advised by before advice from 'AspectLong' (AspectLong.aj:8)"/>
  528. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:12) advised by before advice from 'AspectLong' (AspectLong.aj:4)"/>
  529. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:13) advised by before advice from 'AspectLong' (AspectLong.aj:8)"/>
  530. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:13) advised by before advice from 'AspectLong' (AspectLong.aj:4)"/>
  531. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:14) advised by before advice from 'AspectLong' (AspectLong.aj:8)"/>
  532. <message kind="weave" text="Type 'AutoboxingJ' (AutoboxingJ.java:14) advised by before advice from 'AspectLong' (AspectLong.aj:4)"/>
  533. </compile>
  534. <run class="AutoboxingJ">
  535. <stderr>
  536. <line text="Long:1000000"/>
  537. <line text="long:1000000"/>
  538. <line text="method_takes_Long=1000000"/>
  539. <line text="Long:2000000"/>
  540. <line text="long:2000000"/>
  541. <line text="method_takes_Long=2000000"/>
  542. <line text="Long:3000000"/>
  543. <line text="long:3000000"/>
  544. <line text="method_takes_long=3000000"/>
  545. <line text="Long:4000000"/>
  546. <line text="long:4000000"/>
  547. <line text="method_takes_long=4000000"/>
  548. </stderr>
  549. </run>
  550. </ajc-test>
  551. <ajc-test dir="java5/autoboxing" vm="1.5" title="boolean boxing">
  552. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectBoolean.aj"
  553. options="-1.5,-showWeaveInfo">
  554. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:9) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:8)"/>
  555. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:9) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:4)"/>
  556. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:10) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:8)"/>
  557. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:10) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:4)"/>
  558. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:11) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:8)"/>
  559. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:11) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:4)"/>
  560. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:12) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:8)"/>
  561. <message kind="weave" text="Type 'AutoboxingZ' (AutoboxingZ.java:12) advised by before advice from 'AspectBoolean' (AspectBoolean.aj:4)"/>
  562. </compile>
  563. <run class="AutoboxingZ">
  564. <stderr>
  565. <line text="Boolean:false"/>
  566. <line text="boolean:false"/>
  567. <line text="method_takes_Boolean=false"/>
  568. <line text="Boolean:false"/>
  569. <line text="boolean:false"/>
  570. <line text="method_takes_Boolean=false"/>
  571. <line text="Boolean:false"/>
  572. <line text="boolean:false"/>
  573. <line text="method_takes_boolean=false"/>
  574. <line text="Boolean:false"/>
  575. <line text="boolean:false"/>
  576. <line text="method_takes_boolean=false"/>
  577. </stderr>
  578. </run>
  579. </ajc-test>
  580. <ajc-test dir="java5/autoboxing" vm="1.5" title="byte boxing">
  581. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectByte.aj"
  582. options="-1.5,-showWeaveInfo">
  583. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:11) advised by before advice from 'AspectByte' (AspectByte.aj:8)"/>
  584. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:11) advised by before advice from 'AspectByte' (AspectByte.aj:4)"/>
  585. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:12) advised by before advice from 'AspectByte' (AspectByte.aj:8)"/>
  586. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:12) advised by before advice from 'AspectByte' (AspectByte.aj:4)"/>
  587. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:13) advised by before advice from 'AspectByte' (AspectByte.aj:8)"/>
  588. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:13) advised by before advice from 'AspectByte' (AspectByte.aj:4)"/>
  589. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:14) advised by before advice from 'AspectByte' (AspectByte.aj:8)"/>
  590. <message kind="weave" text="Type 'AutoboxingB' (AutoboxingB.java:14) advised by before advice from 'AspectByte' (AspectByte.aj:4)"/>
  591. </compile>
  592. <run class="AutoboxingB">
  593. <stderr>
  594. <line text="Byte:1"/>
  595. <line text="byte:1"/>
  596. <line text="method_takes_Byte=1"/>
  597. <line text="Byte:50"/>
  598. <line text="byte:50"/>
  599. <line text="method_takes_Byte=50"/>
  600. <line text="Byte:3"/>
  601. <line text="byte:3"/>
  602. <line text="method_takes_byte=3"/>
  603. <line text="Byte:52"/>
  604. <line text="byte:52"/>
  605. <line text="method_takes_byte=52"/>
  606. </stderr>
  607. </run>
  608. </ajc-test>
  609. <ajc-test dir="java5/autoboxing" vm="1.5" title="boxing in after returning">
  610. <compile files="AutoboxingB.java,AutoboxingC.java,AutoboxingD.java,AutoboxingF.java,AutoboxingI.java,AutoboxingJ.java,AutoboxingS.java,AutoboxingZ.java,SimpleAutoboxing.java,AspectAfterReturning.aj"
  611. options="-1.5,-showWeaveInfo">
  612. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:18) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:4)"/>
  613. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:18) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:8)"/>
  614. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:18) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:12)"/>
  615. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:19) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:4)"/>
  616. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:19) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:8)"/>
  617. <message kind="weave" text="Type 'AspectAfterReturning' (AspectAfterReturning.aj:19) advised by afterReturning advice from 'AspectAfterReturning' (AspectAfterReturning.aj:12)"/>
  618. </compile>
  619. <run class="AspectAfterReturning">
  620. <stderr>
  621. <line text="Returning I=5"/>
  622. <line text="Returning Integer=5"/>
  623. <line text="Returning Object=5"/>
  624. <line text="Returning I=10"/>
  625. <line text="Returning Integer=10"/>
  626. <line text="Returning Object=10"/>
  627. </stderr>
  628. </run>
  629. </ajc-test>
  630. <!-- ======================================================================================= -->
  631. <!-- Covariance tests -->
  632. <!-- ======================================================================================= -->
  633. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 1">
  634. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect01.aj">
  635. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:26) advised by before advice from 'CovAspect01' (CovAspect01.aj:5)"/>
  636. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect01' (CovAspect01.aj:5)"/>
  637. </compile>
  638. </ajc-test>
  639. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 2">
  640. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect02.aj">
  641. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:26) advised by before advice from 'CovAspect02' (CovAspect02.aj:5)"/>
  642. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect02' (CovAspect02.aj:5)"/>
  643. </compile>
  644. </ajc-test>
  645. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 3">
  646. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect03.aj">
  647. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:26) advised by before advice from 'CovAspect03' (CovAspect03.aj:5)"/>
  648. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect03' (CovAspect03.aj:5)"/>
  649. </compile>
  650. </ajc-test>
  651. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 4">
  652. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram02.java,CovAspect04.aj">
  653. <message kind="weave" text="Type 'CovBaseProgram02' (CovBaseProgram02.java:30) advised by before advice from 'CovAspect04' (CovAspect04.aj:5)"/>
  654. </compile>
  655. </ajc-test>
  656. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 5">
  657. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect05.aj">
  658. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:26) advised by before advice from 'CovAspect05' (CovAspect05.aj:5)"/>
  659. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect05' (CovAspect05.aj:5)"/>
  660. </compile>
  661. </ajc-test>
  662. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 6">
  663. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect06.aj">
  664. <message kind="warning" line="3" text="does not match because declaring type is Super"/>
  665. </compile>
  666. </ajc-test>
  667. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 7">
  668. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect07.aj">
  669. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect07' (CovAspect07.aj:5)"/>
  670. <message kind="warning" line="3" text="does not match because declaring type is Super"/>
  671. </compile>
  672. </ajc-test>
  673. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 8">
  674. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect08.aj">
  675. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect08' (CovAspect08.aj:11)"/>
  676. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect08' (CovAspect08.aj:5)"/>
  677. </compile>
  678. </ajc-test>
  679. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 9">
  680. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect09.aj">
  681. </compile>
  682. </ajc-test>
  683. <ajc-test dir="java5/covariance" vm="1.5" title="covariance 10">
  684. <compile options="-1.5,-showWeaveInfo" files="CovBaseProgram01.java,CovAspect10.aj">
  685. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:26) advised by before advice from 'CovAspect10' (CovAspect10.aj:5)"/>
  686. <message kind="weave" text="Type 'CovBaseProgram01' (CovBaseProgram01.java:27) advised by before advice from 'CovAspect10' (CovAspect10.aj:5)"/>
  687. </compile>
  688. </ajc-test>
  689. <!-- ======================================================================================= -->
  690. <!-- Enum tests -->
  691. <!-- ======================================================================================= -->
  692. <ajc-test dir="java5/enums" vm="1.5" title="cant itd constructor on enum">
  693. <compile files="SimpleEnum.java,SimpleEnum2.java,EnumAspect01.aj" options="-1.5">
  694. <message kind="error" line="2" text="can't make inter-type constructor declarations on enum types"/>
  695. </compile>
  696. </ajc-test>
  697. <ajc-test dir="java5/enums" vm="1.5" title="cant itd field or method on enum">
  698. <compile files="SimpleEnum.java,SimpleEnum2.java,EnumAspect02.aj" options="-1.5">
  699. <message kind="error" line="2" text="can't make inter-type method declarations on enum types"/>
  700. <message kind="error" line="6" text="can't make inter-type field declarations on enum types"/>
  701. </compile>
  702. </ajc-test>
  703. <ajc-test dir="java5/enums" vm="1.5" title="declare parents and enums">
  704. <compile files="SimpleEnum.java,SimpleEnum2.java,EnumAspect03.aj" options="-1.5">
  705. <message kind="error" line="5" text="can't use declare parents to make enum type SimpleEnum implement an interface"/>
  706. <message kind="error" line="8" text="can't use declare parents to alter supertype of enum type SimpleEnum"/>
  707. <message kind="error" line="11" text="can't use declare parents to make 'java.lang.Enum' the parent of type EnumAspect03$D"/>
  708. </compile>
  709. </ajc-test>
  710. <ajc-test dir="java5/enums" vm="1.5" title="wildcard enum match in itd">
  711. <compile files="SimpleEnum.java,SimpleEnum2.java,EnumAspect04.aj" options="-1.5">
  712. <message kind="warning" line="5" text="enum type SimpleEnum2 matches a declare parents type pattern but is being ignored"/>
  713. <message kind="warning" line="5" text="enum type SimpleEnum matches a declare parents type pattern but is being ignored"/>
  714. </compile>
  715. </ajc-test>
  716. <!-- ======================================================================================= -->
  717. <!-- pertypewithin tests -->
  718. <!-- ======================================================================================= -->
  719. <ajc-test dir="java5/pertypewithin" title="basic ptw test">
  720. <compile files="A.java,B.java,C.java,D.java,Main.java,X.java"/>
  721. <run class="p.A">
  722. <stderr>
  723. <line text="hi from A"/>
  724. <line text="after() returning from a method call to sayhi()"/>
  725. <line text="hi from A"/>
  726. <line text="after() returning from a method call to sayhi()"/>
  727. <line text="Tests in A have passed"/>
  728. <line text="callcount = 2"/>
  729. </stderr>
  730. </run>
  731. </ajc-test>
  732. <ajc-test dir="java5/pertypewithin" title="ptw hasAspect">
  733. <compile files="A.java,B.java,C.java,D.java,Main.java,X.java"/>
  734. <run class="p.B">
  735. <stderr>
  736. <line text="hi from B"/>
  737. <line text="after() returning from a method call to sayhi()"/>
  738. <line text="hi from B"/>
  739. <line text="after() returning from a method call to sayhi()"/>
  740. <line text="hi from B"/>
  741. <line text="after() returning from a method call to sayhi()"/>
  742. <line text="callcount = 3"/>
  743. </stderr>
  744. </run>
  745. </ajc-test>
  746. <ajc-test dir="java5/pertypewithin" title="ptw aspectOf">
  747. <compile files="A.java,B.java,C.java,D.java,Main.java,X.java"/>
  748. <run class="p.C"/>
  749. </ajc-test>
  750. <ajc-test dir="java5/pertypewithin" title="ptw multi-aspects">
  751. <compile files="P.java,Q.java,R.java"/>
  752. <run class="P">
  753. <stderr>
  754. <line text="Q reporting 2"/>
  755. <line text="R reporting 3"/>
  756. </stderr>
  757. </run>
  758. </ajc-test>
  759. <ajc-test dir="java5/pertypewithin" title="ptw binary">
  760. <weave classesFiles="G.java" aspectsFiles="H.java"/>
  761. <run class="G">
  762. <stderr>
  763. <line text="advice running"/>
  764. </stderr>
  765. </run>
  766. </ajc-test>
  767. <ajc-test dir="java5/pertypewithin" title="ptw binary aspect">
  768. <compile files="H.java" outjar="aspects.jar">
  769. <message kind="warning" line="1" text="no match for this type name: G"/>
  770. </compile>
  771. <compile files="G.java" aspectpath="aspects.jar"/>
  772. <run class="G">
  773. <stderr>
  774. <line text="advice running"/>
  775. </stderr>
  776. </run>
  777. </ajc-test>
  778. <!-- ======================================================================================= -->
  779. <!-- varargs tests -->
  780. <!-- ======================================================================================= -->
  781. <ajc-test dir="java5/varargs" vm="1.5" title="varargs not matched by Object[] (call)">
  782. <compile files="SimpleVarargs.java,VarargsAspect01.aj" options="-1.5,-showWeaveInfo">
  783. </compile>
  784. </ajc-test>
  785. <ajc-test dir="java5/varargs" vm="1.5" title="varargs not matched by Object[] (exe)">
  786. <compile files="SimpleVarargs.java,VarargsAspect02.aj" options="-1.5,-showWeaveInfo">
  787. </compile>
  788. </ajc-test>
  789. <ajc-test dir="java5/varargs" vm="1.5" title="varargs not matched by Object[] (init)">
  790. <compile files="SimpleVarargs.java,VarargsAspect03.aj" options="-1.5,-showWeaveInfo">
  791. </compile>
  792. </ajc-test>
  793. <ajc-test dir="java5/varargs" vm="1.5" title="varargs not matched by Object[] (withincode)">
  794. <compile files="SimpleVarargs.java,VarargsAspect04.aj" options="-1.5,-showWeaveInfo">
  795. </compile>
  796. </ajc-test>
  797. <ajc-test dir="java5/varargs" vm="1.5" title="call with varargs signature">
  798. <compile files="SimpleVarargs.java,VarargsAspect05.aj" options="-1.5,-showWeaveInfo">
  799. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:20) advised by before advice from 'VarargsAspect05' (VarargsAspect05.aj:3)"/>
  800. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:21) advised by before advice from 'VarargsAspect05' (VarargsAspect05.aj:3)"/>
  801. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:22) advised by before advice from 'VarargsAspect05' (VarargsAspect05.aj:3)"/>
  802. </compile>
  803. </ajc-test>
  804. <ajc-test dir="java5/varargs" vm="1.5" title="call with varargs multi-signature">
  805. <compile files="SimpleVarargs.java,VarargsAspect06.aj" options="-1.5,-showWeaveInfo">
  806. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:25) advised by before advice from 'VarargsAspect06' (VarargsAspect06.aj:3)"/>
  807. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:26) advised by before advice from 'VarargsAspect06' (VarargsAspect06.aj:3)"/>
  808. <message kind="weave" text="Type 'SimpleVarargs' (SimpleVarargs.java:27) advised by before advice from 'VarargsAspect06' (VarargsAspect06.aj:3)"/>
  809. </compile>
  810. </ajc-test>
  811. <ajc-test dir="java5/suppressedWarnings" vm="1.5" title="suppressing non-matching advice warnings">
  812. <compile files="Suppression1.aj" options="-1.5,-showWeaveInfo">
  813. <message kind="warning" line="13"/>
  814. <message kind="warning" line="21"/>
  815. </compile>
  816. </ajc-test>
  817. <ajc-test dir="java5/suppressedWarnings" vm="1.5" title="suppressing non-matching advice warnings when multiple source files involved">
  818. <compile files="A.java,A1.aj,A2.aj,A3.aj" options="-1.5,-showWeaveInfo">
  819. <message kind="warning" line="4" file="A1.aj"/>
  820. <message kind="warning" line="4" file="A2.aj"/>
  821. <message kind="warning" line="11" file="A2.aj"/>
  822. <message kind="warning" line="4" file="A3.aj"/>
  823. <message kind="warning" line="11" file="A3.aj"/>
  824. </compile>
  825. </ajc-test>
  826. <!-- ======================================================================================= -->
  827. <!-- annotated aspect members -->
  828. <!-- ======================================================================================= -->
  829. <ajc-test dir="java5/annotations/aspectMembers" title="annotated annotations (@Target)">
  830. <compile files="a/Annotations.java,a/Foo.java" options="-1.5">
  831. <message kind="error" line="16" text="The annotation @MethodAnnotation is disallowed for this location"/>
  832. </compile>
  833. </ajc-test>
  834. <ajc-test dir="java5/annotations/aspectMembers" title="simple annotated aspect members">
  835. <compile files="a/Annotations.java,a/AnnotatedAspect.aj" options="-1.5">
  836. <message kind="warning" line="4" text="annotated type"/>
  837. <message kind="warning" line="6" text="annotated field"/>
  838. <message kind="warning" line="8" text="annotated method"/>
  839. <message kind="warning" line="11" text="annotated constructor"/>
  840. </compile>
  841. </ajc-test>
  842. <ajc-test dir="java5/annotations/aspectMembers" title="simple annotated aspect members with bad target">
  843. <compile files="a/Annotations.java,a/AnnotatedAspect02.aj" options="-1.5">
  844. <message kind="error" line="3" text="The annotation @MethodAnnotation is disallowed for this location"/>
  845. <message kind="error" line="6" text="The annotation @TypeAnnotation is disallowed for this location"/>
  846. <message kind="error" line="8" text="The annotation @FieldAnnotation is disallowed for this location"/>
  847. <message kind="error" line="10" text="The annotation @AnnotationAnnotation is disallowed for this location"/>
  848. </compile>
  849. </ajc-test>
  850. <ajc-test dir="java5/annotations/aspectMembers" title="annotated itds">
  851. <compile files="a/Annotations.java,a/AnnotatedAspect03.aj" options="-1.5">
  852. <message kind="warning" line="4" text="annotated type"/>
  853. <message kind="warning" line="6" text="annotated field"/>
  854. <message kind="warning" line="8" text="annotated field"/>
  855. <message kind="warning" line="10" text="annotated method"/>
  856. <message kind="warning" line="12" text="annotated constructor"/>
  857. </compile>
  858. </ajc-test>
  859. <ajc-test dir="java5/annotations/aspectMembers" title="annotated itds with bad target">
  860. <compile files="a/Annotations.java,a/AnnotatedAspect04.aj" options="-1.5">
  861. <message kind="error" line="6" text="The annotation @ConstructorAnnotation is disallowed for this location"/>
  862. <message kind="error" line="8" text="The annotation @FieldAnnotation is disallowed for this location"/>
  863. <message kind="error" line="10" text="The annotation @TypeAnnotation is disallowed for this location"/>
  864. <!-- known limitation...
  865. <message kind="error" line="12" text="The annotation @MethodAnnotation is disallowed for this location"/>
  866. -->
  867. </compile>
  868. </ajc-test>
  869. <ajc-test dir="java5/annotations/aspectMembers" title="annotated advice">
  870. <compile files="a/Annotations.java,a/AnnotatedAspect05.aj" options="-1.5">
  871. </compile>
  872. </ajc-test>
  873. <ajc-test dir="java5/annotations/aspectMembers" title="annotated advice with bad target">
  874. <compile files="a/Annotations.java,a/AnnotatedAspect06.aj" options="-1.5">
  875. </compile>
  876. </ajc-test>
  877. <ajc-test dir="java5/annotations/aspectMembers" title="annotated pointcut">
  878. <compile files="a/Annotations.java,a/AnnotatedAspect07.aj" options="-1.5">
  879. </compile>
  880. </ajc-test>
  881. <ajc-test dir="java5/annotations/aspectMembers" title="annotated declare statements">
  882. <compile files="a/Annotations.java,a/AnnotatedAspect08.aj" options="-1.5">
  883. </compile>
  884. </ajc-test>
  885. <!-- ======================================================================================= -->
  886. <!-- declare annotation -->
  887. <!-- ======================================================================================= -->
  888. <ajc-test dir="java5/annotations/declare" title="basic declare annotation parse test">
  889. <compile files="BasicParseTest.aj" options="-1.5">
  890. </compile>
  891. </ajc-test>
  892. </suite>