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

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