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

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