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.

ajc1612.xml 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <suite>
  3. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 1">
  4. <compile files="One.java" options="-1.5"/>
  5. <run class="One">
  6. <stdout>
  7. <line text="In instance check method doit()"/>
  8. <line text="In advice()"/>
  9. <line text="Method m() running"/>
  10. </stdout>
  11. </run>
  12. </ajc-test>
  13. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 2">
  14. <compile files="Two.java" options="-1.5"/>
  15. <run class="Two">
  16. <stdout>
  17. <line text="In instance check method, count=1 so doit returns false"/>
  18. <line text="Method m() running"/>
  19. <line text="In instance check method, count=2 so doit returns true"/>
  20. <line text="In advice()"/>
  21. <line text="Method m() running"/>
  22. <line text="In instance check method, count=3 so doit returns false"/>
  23. <line text="Method m() running"/>
  24. <line text="In instance check method, count=4 so doit returns true"/>
  25. <line text="In advice()"/>
  26. <line text="Method m() running"/>
  27. </stdout>
  28. </run>
  29. </ajc-test>
  30. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 3">
  31. <compile files="Three.java" options="-1.5"/>
  32. <run class="Three">
  33. <stdout>
  34. <line text="Method m() running"/>
  35. <line text="In instance check method, count=1 so doit returns false"/>
  36. <line text="Method m() running"/>
  37. <line text="In instance check method, count=2 so doit returns true"/>
  38. <line text="In advice()"/>
  39. <line text="Method m() running"/>
  40. <line text="In instance check method, count=3 so doit returns false"/>
  41. <line text="Method m() running"/>
  42. <line text="In instance check method, count=4 so doit returns true"/>
  43. <line text="In advice()"/>
  44. </stdout>
  45. </run>
  46. </ajc-test>
  47. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 4">
  48. <compile files="Four.java" options="-1.5"/>
  49. <run class="Four">
  50. <stdout>
  51. <line text="In instance check method doit()"/>
  52. <line text="In advice() execution(void Four.m())"/>
  53. <line text="Method m() running"/>
  54. </stdout>
  55. </run>
  56. </ajc-test>
  57. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 5">
  58. <compile files="Five.java" options="-1.5"/>
  59. <run class="Five">
  60. <stdout>
  61. <line text="In instance check method doit()"/>
  62. <line text="In advice() arg0=abc"/>
  63. <line text="Method m() running"/>
  64. </stdout>
  65. </run>
  66. </ajc-test>
  67. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 6">
  68. <compile files="Six.java" options="-1.5"/>
  69. <run class="Six">
  70. <stdout>
  71. <line text="In instance check method doit()"/>
  72. <line text="In advice() execution(void Six.main(String[]))"/>
  73. <line text="Method m() running"/>
  74. </stdout>
  75. </run>
  76. </ajc-test>
  77. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 7">
  78. <compile files="Seven.java" options="-1.5"/>
  79. <run class="Seven">
  80. <stdout>
  81. <line text="In instance check method doit()"/>
  82. <line text="In advice() call(void Seven.m()) execution(void Seven.main(String[]))"/>
  83. <line text="Method m() running"/>
  84. </stdout>
  85. </run>
  86. </ajc-test>
  87. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 8">
  88. <compile files="Eight.java" options="-1.5"/>
  89. <run class="Eight">
  90. <stdout>
  91. <line text="in doit(): class=X"/>
  92. <line text="In advice()"/>
  93. <line text="Method m() running"/>
  94. </stdout>
  95. </run>
  96. </ajc-test>
  97. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 9">
  98. <compile files="Nine.java" options="-1.5"/>
  99. <run class="Nine">
  100. <stdout>
  101. <line text="in doit(): class=X"/>
  102. <line text="In advice()"/>
  103. <line text="Method m() running"/>
  104. </stdout>
  105. </run>
  106. </ajc-test>
  107. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 10">
  108. <compile files="Ten.java" options="-1.5"/>
  109. <run class="com.foo.bar.Ten">
  110. <stdout>
  111. <line text="In instance check method doit() class=com.foo.bar.X"/>
  112. <line text="In advice()"/>
  113. <line text="Method m() running"/>
  114. </stdout>
  115. </run>
  116. </ajc-test>
  117. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 11">
  118. <compile files="Eleven.java" options="-1.5">
  119. <message kind="error" text="thisAspectInstance can only be used inside an if() clause for singleton aspects (compiler limitation)"/>
  120. </compile>
  121. </ajc-test>
  122. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 12">
  123. <compile files="Twelve.java" options="-1.5"/>
  124. <run class="Twelve">
  125. <stdout>
  126. <line text="In instance check method doit()"/>
  127. <line text="In advice() arg=abc tjpsp=execution(void Twelve.m(String))"/>
  128. <line text="Method m() running"/>
  129. </stdout>
  130. </run>
  131. </ajc-test>
  132. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 13">
  133. <compile files="Thirteen.java" options="-1.5"/>
  134. <run class="Thirteen">
  135. <stdout>
  136. <line text="instance is X"/>
  137. <line text="In advice() arg=abc tjpsp=execution(void Thirteen.m(String))"/>
  138. <line text="Method m() running"/>
  139. </stdout>
  140. </run>
  141. </ajc-test>
  142. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 14">
  143. <compile files="Fourteen.java" options="-1.5"/>
  144. <run class="Fourteen">
  145. <stdout>
  146. <line text="instance is X"/>
  147. <line text="In advice()"/>
  148. <line text="Method m() running"/>
  149. </stdout>
  150. </run>
  151. </ajc-test>
  152. <ajc-test dir="bugs1612/pr239649" title="thisAspectInstance - 15">
  153. <compile files="Fifteen.java" options="-1.5"/>
  154. <run class="Fifteen">
  155. <stdout>
  156. <line text="in doit(): class=X"/>
  157. <line text="In advice()"/>
  158. <line text="Method m() running"/>
  159. </stdout>
  160. </run>
  161. </ajc-test>
  162. <ajc-test dir="bugs1612/doubleITDF" title="double itdf">
  163. <compile files="A.java" options="-1.7"/>
  164. <run class="A">
  165. <stdout>
  166. <line text="AA"/>
  167. </stdout>
  168. </run>
  169. </ajc-test>
  170. <ajc-test dir="bugs1612/verify" title="verify perthis">
  171. <compile files="Runner.aj" inpath="code.jar" classpath="groovy-1.8.0.jar;asm-3.2.jar" options="-1.6 -Xset:generateStackMaps=true"/>
  172. <run class="Runner">
  173. <stdout>
  174. <line text="AA"/>
  175. </stdout>
  176. </run>
  177. </ajc-test>
  178. <ajc-test dir="bugs1612/pr353936" title="local variable tables">
  179. <compile files="Code.java" options="-1.5"/>
  180. </ajc-test>
  181. <ajc-test dir="bugs1612/pr352363" title="empty pattern">
  182. <compile files="Code.java" options="-1.5">
  183. <message line="12" kind="warning" text="name is empty1"/>
  184. <message line="13" kind="warning" text="name is empty2"/>
  185. </compile>
  186. </ajc-test>
  187. <ajc-test dir="bugs1612/pr351592" title="generics issue">
  188. <compile files="Test.java Fib.java FibCaching.aj Caching.aj" options="-1.5"/>
  189. <run class="caching.Test"/>
  190. </ajc-test>
  191. <ajc-test dir="bugs1612/pr351592" title="generics issue - 2">
  192. <compile files="Test.java Fib.java FibCaching.aj Caching.aj" options="-1.5"/>
  193. <run class="caching.Test"/>
  194. </ajc-test>
  195. <ajc-test dir="bugs1612/pr350800" title="generics npe">
  196. <compile files="AbstractAdapter.java AbstractProbingAspect.java Adapter.java ProbingAspect.java" options="-1.5"/>
  197. <!-- run class="com.example.MyAspectTest" -->
  198. </ajc-test>
  199. <ajc-test dir="bugs1612/pr350800_2" title="generics npe - code">
  200. <compile files="AbstractAdapter.java AbstractProbingAspect.java Adapter.java ProbingAspect.java" options="-1.5"/>
  201. <!-- run class="com.example.MyAspectTest" -->
  202. </ajc-test>
  203. <ajc-test dir="bugs1612/pr350800_3" title="generics npe - 3">
  204. <compile files="AbstractAdapter.java AbstractProbingAspect.java Adapter.java ProbingAspect.java" options="-1.5"/>
  205. <run class="test.aop.Adapter">
  206. <stdout>
  207. <line text="&gt;hello"/>
  208. </stdout>
  209. </run>
  210. </ajc-test>
  211. <ajc-test dir="bugs1612/pr349961" title="ordering">
  212. <compile files="MyParameterAnnotation.java MyAspect.java MyAspectTest.java A.java ABean.java" options="-1.5"/>
  213. <run class="com.example.MyAspectTest">
  214. </run>
  215. </ajc-test>
  216. <ajc-test dir="bugs1612/pr349961" title="ordering - 2">
  217. <compile files="MyParameterAnnotation.java MyAspect.java MyAspectTest.java ABean.java A.java" options="-1.5"/>
  218. <run class="com.example.MyAspectTest">
  219. </run>
  220. </ajc-test>
  221. <ajc-test dir="bugs1612/pr347395" title="verifyerror - inline">
  222. <compile files="Target.java Task.java TaskHistoryAspect.aj TaskModification.java" options="-1.5"/>
  223. <run class="xxx.util.Target">
  224. </run>
  225. </ajc-test>
  226. <ajc-test dir="bugs1612/pr349398" title="duplicate methods">
  227. <compile files="DataGenerator.java CacheAspect.java DataGeneratorCacheAspect.java DataGeneratorTest.java" options="-1.5"/>
  228. <run class="DataGeneratorTest">
  229. </run>
  230. </ajc-test>
  231. <ajc-test dir="bugs1612/pr347684" title="binding ints">
  232. <compile files="BindingInts.java" options="-1.5"/>
  233. <run class="BindingInts">
  234. <stdout>
  235. <line text="execution(void BindingInts.a()) 37"/>
  236. </stdout>
  237. </run>
  238. </ajc-test>
  239. <ajc-test dir="bugs1612/pr347684" title="binding ints - 2">
  240. <compile files="BindingInts2.java" options="-1.5"/>
  241. <run class="BindingInts2">
  242. <stdout>
  243. <line text="execution(void BindingInts2.a()) 99"/>
  244. </stdout>
  245. </run>
  246. </ajc-test>
  247. <ajc-test dir="bugs1612/pr347684" title="binding ints - 3">
  248. <compile files="BindingInts3.java" options="-1.5"/>
  249. <run class="BindingInts3">
  250. <stdout>
  251. <line text="execution(void BindingInts3.a()) abc"/>
  252. </stdout>
  253. </run>
  254. </ajc-test>
  255. <ajc-test dir="bugs1612/pr347684" title="binding ints - 4">
  256. <compile files="BindingInts4.java" options="-1.5"/>
  257. <run class="BindingInts4">
  258. <stdout>
  259. <line text="execution(void BindingInts4.a()) 37 48"/>
  260. </stdout>
  261. </run>
  262. </ajc-test>
  263. <ajc-test dir="bugs1612/pr347684" title="binding ints - 5">
  264. <compile files="BindingInts5.java" options="-1.5"/>
  265. <run class="BindingInts5">
  266. <stdout>
  267. <line text="execution(void BindingInts5.a()) 37"/>
  268. </stdout>
  269. </run>
  270. </ajc-test>
  271. <ajc-test dir="bugs1612/pr347684" title="binding ints - 6">
  272. <compile files="BindingInts6.java" options="-1.5"/>
  273. <run class="BindingInts6">
  274. <stdout>
  275. <line text="execution(void BindingInts6.a()) 37 1 99"/>
  276. </stdout>
  277. </run>
  278. </ajc-test>
  279. <ajc-test dir="bugs1612/pr345515" title="anno copying">
  280. <compile files="Code.java" options="-1.5"/>
  281. <run class="Code"></run>
  282. </ajc-test>
  283. <ajc-test dir="bugs1612/pr327867" title="synthetic methods">
  284. <compile files="Foo.java" options="-1.5 -showWeaveInfo">
  285. <message kind="weave" text="Join point 'method-execution(void Foo.main(java.lang.String[]))' in Type 'Foo' (Foo.java:3) advised by before advice from 'X' (Foo.java:17)"/>
  286. <message kind="weave" text="Join point 'method-execution(void Foo.m())' in Type 'Foo' (Foo.java:7) advised by before advice from 'X' (Foo.java:17)"/>
  287. </compile>
  288. <run class="Foo"/>
  289. </ajc-test>
  290. <ajc-test dir="bugs1612/pr345172" title="incorrect annos">
  291. <compile files="InterType.java" options="-1.5 -showWeaveInfo">
  292. <message kind="weave" text="Join point 'method-execution(void InterType$InterTypeIfc.m1(int))' in Type 'InterType' (InterType.java:21) advised by around advice from 'InterType$AroundMethod' (InterType.java:12)"/>
  293. <!--
  294. <message kind="weave" text="Join point 'method-execution(void InterType$InterTypeIfc.m1(int, int))' in Type 'InterType' (InterType.java:24) advised by around advice from 'InterType$AroundMethod' (InterType.java:12)"/>
  295. <message kind="weave" text="Join point 'method-execution(void InterType.m1(int))' in Type 'InterType' (InterType.java:28) advised by around advice from 'InterType$AroundMethod' (InterType.java:12)"/>
  296. -->
  297. <message kind="weave" text="Type 'InterType$InterTypeIfc' (InterType.java) has intertyped method from 'InterType' (InterType.java:'void InterType$InterTypeIfc.m1(int)')"/>
  298. <message kind="weave" text="Type 'InterType$InterTypeIfc' (InterType.java) has intertyped method from 'InterType' (InterType.java:'void InterType$InterTypeIfc.m1(int, int)')"/>
  299. </compile>
  300. <run class="InterType"/>
  301. </ajc-test>
  302. <ajc-test dir="bugs1612/pr345172" title="incorrect annos 2">
  303. <compile files="InterType2.java" options="-1.5">
  304. </compile>
  305. <run class="InterType2">
  306. <stdout>
  307. <line text="execution(void InterType2.InterTypeIfc.m1(int))"/>
  308. </stdout></run>
  309. </ajc-test>
  310. <ajc-test dir="bugs1612/pr345172" title="incorrect annos 3">
  311. <compile files="InterType3.java" options="-1.5">
  312. </compile>
  313. <run class="InterType3">
  314. <stdout>
  315. <line text="execution(void InterType3.InterTypeIfc.m1(int, String))"/>
  316. </stdout></run>
  317. </ajc-test>
  318. <ajc-test dir="bugs1612/pr328099" title="signed jar ltw">
  319. <compile files="X.java" classpath="code.jar"/>
  320. <run class="foo.bar.FooLaunch" ltw="aop.xml" classpath="$sandbox/code.jar">
  321. <stdout>
  322. <line text="pre...Foo.bar()...post"/>
  323. </stdout>
  324. </run>
  325. </ajc-test>
  326. <ajc-test dir="bugs1612/pr315398" title="verifyerror">
  327. <compile files="Code.java" options="-1.5">
  328. </compile>
  329. <run class="Code">
  330. <stdout>
  331. <line text="1"/>
  332. <line text="advice"/>
  333. <line text="2"/>
  334. </stdout></run>
  335. </ajc-test>
  336. <ajc-test dir="bugs1612/pr315398" title="verifyerror - 2">
  337. <compile files="Code2.java" options="-1.5">
  338. </compile>
  339. <run class="Code2"></run>
  340. </ajc-test>
  341. <ajc-test dir="bugs1612/pr335810" title="rawtype warning">
  342. <compile files="One.java" options="-1.5 -warn:+raw -warn:+warningToken">
  343. </compile>
  344. </ajc-test>
  345. <ajc-test dir="bugs1612/pr327134" title="rawtype pointcut">
  346. <compile files="Code.java" options="-1.5 -warn:+raw -warn:+warningToken">
  347. </compile>
  348. </ajc-test>
  349. <ajc-test dir="bugs1612/pr344005" title="decp generics">
  350. <compile files="Anno.java Types.java Azpect.java" options="-1.5 -showWeaveInfo">
  351. <message kind="weave" text="XX"/>
  352. </compile>
  353. </ajc-test>
  354. <ajc-test dir="bugs1612/pr343051" title="illegalaccesserror">
  355. <compile files="Code.java Code2.java Azpect.java" options="-1.5"/>
  356. <run class="p.Code">
  357. <stdout>
  358. <line text="abc"/>
  359. </stdout>
  360. </run>
  361. </ajc-test>
  362. <ajc-test dir="bugs1612/pr339974" title="itit npe">
  363. <compile files="City.java TrafficCalculator.java" options="-1.5">
  364. <message kind="error" text="The nested type TrafficCalculator cannot hide an enclosing type"/>
  365. </compile>
  366. </ajc-test>
  367. <ajc-test dir="bugs1612/pr342605" title="noimporterror">
  368. <compile files="Code.java" options="-1.5 -noImportError"/>
  369. <run class="Code"/>
  370. </ajc-test>
  371. <ajc-test dir="bugs1612/pr342323" title="clashing local types">
  372. <compile files="Runner.java Bean.java Azpect.java" options="-1.5"/>
  373. <run class="ppp.Runner">
  374. <stdout>
  375. <line text="Calling regular method"/>
  376. <line text="class"/>
  377. <line text="Calling itd method"/>
  378. <line text="aspect foo"/>
  379. </stdout>
  380. </run>
  381. </ajc-test>
  382. <ajc-test dir="bugs1612/pr338175" title="itit">
  383. <compile files="pack1/Aspect.java pack2/Java.java pack2/Java2.java" options="-1.5">
  384. <message kind="error" text="Duplicate nested type ITIT"/>
  385. <message kind="error" text="can't determine modifiers"/>
  386. </compile>
  387. </ajc-test>
  388. <ajc-test dir="bugs1612/pr292239" title="throws clause">
  389. <compile files="Code.java" options="-1.5 -showWeaveInfo">
  390. <message kind="weave" text="Join point 'method-execution(void mypackage.Code.n())' in Type 'mypackage.Code' (Code.java:19) advised by afterThrowing advice from 'mypackage.Azpect' (Code.java:9)"/>
  391. </compile>
  392. <run class="mypackage.Code">
  393. <stdout>
  394. <line text="caught it"/>
  395. <line text="done"/>
  396. </stdout>
  397. </run>
  398. </ajc-test>
  399. <ajc-test dir="bugs1612/pr292239" title="throws clause - 2">
  400. <compile files="Code2.java" options="-1.5 -showWeaveInfo">
  401. <message kind="weave" text="Join point 'method-execution(void mypackage.Code2.n2())' in Type 'mypackage.Code2' (Code2.java:17) advised by afterThrowing advice from 'mypackage.Azpect' (Code2.java:7)"/>
  402. </compile>
  403. <run class="mypackage.Code2">
  404. <stdout>
  405. <line text="caught it: execution(void mypackage.Code2.n2())"/>
  406. <line text="done"/>
  407. </stdout>
  408. </run>
  409. </ajc-test>
  410. <!--
  411. <ajc-test dir="bugs1611/pr336136" title="itit">
  412. <compile files="Country_Roo_Op4j.java">
  413. <message kind="error" text="The import com.foo cannot be resolved" line="1"/>
  414. <message kind="error" text="The import org.javaruntype cannot be resolved" line="3"/>
  415. <message kind="error" text="The import org.op4j cannot be resolved" line="4"/>
  416. <message kind="error" text="The import org.op4j cannot be resolved" line="5"/>
  417. <message kind="error" text="Country cannot be resolved to a type" line="9"/>
  418. <message kind="error" text="Function cannot be resolved to a type" line="11"/>
  419. <message kind="error" text="can't determine modifiers of missing type Country_Roo_Op4j$Keys"/>
  420. </compile>"
  421. </ajc-test>
  422. -->
  423. </suite>