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.

ajc121-tests.xml 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  1. <!-- AspectJ v1.2.1 Tests -->
  2. <ajc-test dir="bugs"
  3. pr="62073" title="false ambiguous binding error (introduced in 1.2rc2)">
  4. <compile files="DisjunctVarBinding_2.java,DisjunctVarBinding_3.java">
  5. <message kind="error" line="4" file="DisjunctVarBinding_3.java" text="ambiguous binding of parameter(s) a, b across '||' in pointcut"/>
  6. </compile>
  7. <compile files="DisjunctVarBinding_3.java,DisjunctVarBinding_2.java">
  8. <message kind="error" line="4" file="DisjunctVarBinding_3.java" text="ambiguous binding of parameter(s) a, b across '||' in pointcut"/>
  9. </compile>
  10. </ajc-test>
  11. <ajc-test dir="bugs/IfPerThis"
  12. pr="62458" title="An if() pointcut inside a perthis() clauses an ABORT - null pointer exception in ajc">
  13. <compile files="Testcase1.java">
  14. <message kind="error" line="15" text="if() pointcut designator cannot be used directly in a per clause"/>
  15. <message kind="error" line="23" text="if() pointcut designator cannot be used directly in a per clause"/>
  16. <message kind="error" line="25" text="if() pointcut designator cannot be used directly in a per clause"/>
  17. <message kind="error" line="27" text="if() pointcut designator cannot be used directly in a per clause"/>
  18. </compile>
  19. </ajc-test>
  20. <ajc-test dir="bugs/IfPerThis"
  21. pr="62458" title="An if() pointcut inside a perthis() clauses an ABORT - null pointer exception in ajc">
  22. <compile files="Testcase2.java"/>
  23. <run class="Testcase2"/>
  24. </ajc-test>
  25. <ajc-test dir="bugs/IfPerThis"
  26. pr="62458" title="An if() pointcut inside a perthis() clauses an ABORT - null pointer exception in ajc">
  27. <compile files="Testcase3.java">
  28. <message kind="error" line="2" text="if() pointcut designator cannot be used directly in a per clause"/>
  29. </compile>
  30. </ajc-test>
  31. <ajc-test dir="bugs/bug70619"
  32. pr="70619" title="compiler aborts with 'conflicting dominates orders' with circular declare precedences">
  33. <compile files="Precedence.java">
  34. <message kind="error" line="0" text="conflicting declare precedence"/>
  35. </compile>
  36. <compile files="Conflict.java,Order2.aj,Order1.aj">
  37. <message kind="error" line="0" text="conflicting declare precedence"/>
  38. </compile>
  39. <compile files="Conflict.java,Order1.aj,Order2.aj">
  40. <message kind="error" line="0" text="conflicting declare precedence"/>
  41. </compile>
  42. </ajc-test>
  43. <ajc-test dir="bugs"
  44. pr="53999" title="'can't bind type' message has $ for . in type name for declare soft">
  45. <compile files="Cosmetic.java">
  46. <message kind="error" line="9" text="can't bind type name 'unknown.Error'"/>
  47. </compile>
  48. </ajc-test>
  49. <ajc-test dir="bugs/intertypeOverrides"
  50. pr="69459" title="Hiding of Instance Methods by static methods">
  51. <compile files="IntertypeOverrides.java">
  52. <message kind="error" line="8" text="void Sub.m() cannot override void Super.m(); overriding method is static"/>
  53. </compile>
  54. <compile files="IntertypeOverrides2.java">
  55. <message kind="error" line="8" text="void Sub.m() cannot override void Super.m(); overridden method is static"/>
  56. </compile>
  57. <compile files="Superclass.java,Subclass.java,Aspect1.java">
  58. <message file="Aspect1.java" kind="error" line="2"
  59. text="void Subclass.staticMethod() cannot override void Superclass.staticMethod(); overridden method is static"/>
  60. </compile>
  61. <compile files="Superclass.java,Subclass.java,Aspect2.java">
  62. <message file="Aspect2.java" kind="error" line="2"
  63. text="void Subclass.nonstaticMethod() cannot override void Superclass.nonstaticMethod(); overriding method is static"/>
  64. </compile>
  65. </ajc-test>
  66. <ajc-test dir="new"
  67. title="if(false) optimisation" pr="48990">
  68. <compile files="IfFalse.aj"/>
  69. <run class="IfFalse"/>
  70. </ajc-test>
  71. <ajc-test dir="new"
  72. title="if(true) optimisation" pr="48990">
  73. <compile files="IfTrue.aj"/>
  74. <run class="IfTrue"/>
  75. </ajc-test>
  76. <ajc-test dir="bugs/abstractITDs"
  77. pr="64331" title="java.lang.NullPointerException in WeaverMessageHandler class">
  78. <compile files="A.java,C.java" aspectpath="B.jar">
  79. <message kind="error" line="1" text="must implement abstract inter-type declaration: void A.foo()"/>
  80. </compile>
  81. </ajc-test>
  82. <ajc-test dir="bugs/pr64262"
  83. title="ClassCastException at BcelRenderer.java:169" pr="64262">
  84. <compile files="PrimitiveCoercionInExactTypePatternMatching.java"/>
  85. </ajc-test>
  86. <ajc-test dir="bugs"
  87. pr="61536" title="Front-end bug, shouldn't allow patterns of the form foo.., should be foo..*">
  88. <compile files="EllipsesStar.java">
  89. <message kind="error" line="3" text="Syntax error on token"/>
  90. <message kind="error" line="4" text="Syntax error on token"/>
  91. <message kind="error" line="5" text="Syntax error on token"/>
  92. <message kind="error" line="6" text="Syntax error on token"/>
  93. <message kind="error" line="8" text="Syntax error on token"/>
  94. <message kind="error" line="10" text="Syntax error on token"/>
  95. <message kind="error" line="12" text="Syntax error on token"/>
  96. </compile>
  97. </ajc-test>
  98. <ajc-test dir="bugs"
  99. pr="67774" title="Nullpointer-Exception when defining a withincode() pointcut">
  100. <compile files="WithincodeNPE01.java">
  101. <!-- there are 3 join points that result in decw match, but 2 are on the same line! -->
  102. <message kind="warning" line="2" text="In String ctor"/>
  103. <message kind="warning" line="11" text="In String ctor"/>
  104. </compile>
  105. </ajc-test>
  106. <ajc-test dir="bugs" pr="60015"
  107. title="NPE, Incorrect XLint:unmatchedSuperTypeInCall warning">
  108. <compile files="IncorrectXlintOnInterface.java">
  109. </compile>
  110. </ajc-test>
  111. <ajc-test dir="bugs/typeVisibilityProblem" pr="67591"
  112. title="invalid warning indicating no match when a match really occurs">
  113. <compile files="Main.java">
  114. </compile>
  115. </ajc-test>
  116. <ajc-test dir="bugs" pr="71273"
  117. title="RuntimeException thrown: Could not find instruction: org.apache.bcel.generic.B2I">
  118. <compile files="NoByteToInt.java"/>
  119. <run class="NoByteToInt"/>
  120. </ajc-test>
  121. <ajc-test dir="bugs/AroundAdviceJPs" pr="71377"
  122. title="Cannot advise private method call in around advice">
  123. <compile files="JoinPointInAroundAdvice.java"/>
  124. <run class="JoinPointInAroundAdvice"/>
  125. </ajc-test>
  126. <ajc-test dir="bugs/AroundAdviceJPs" pr="71377"
  127. title="Cannot advise private field sets in around advice">
  128. <compile files="FieldJoinPointsInAroundAdvice.java"/>
  129. <run class="FieldJoinPointsInAroundAdvice"/>
  130. </ajc-test>
  131. <ajc-test dir="bugs/AroundAdviceJPs" pr="71377"
  132. title="Cannot advise private field gets in around advice">
  133. <compile files="FieldGetJoinPointsInAroundAdvice.java"/>
  134. <run class="FieldGetJoinPointsInAroundAdvice"/>
  135. </ajc-test>
  136. <!--
  137. commented out as test takes over 5 minutes to run - reinstate if you need to investigate 70201 for
  138. any reason.
  139. <ajc-test dir="bugs" pr="70201"
  140. title="Branch target offset too large for short">
  141. <compile files="VeryLongBranch.java"/>
  142. </ajc-test>
  143. -->
  144. <!-- these next two tests commented out as they take minutes to run - reinstate if you need to
  145. investigate 59208 for any reason
  146. <ajc-test dir="bugs/pr59208" pr="59208"
  147. title="Weaver fails in BCEL for large classes">
  148. <compile files="Foo.java, A.aj">
  149. <message kind="error" line="0" text="constant pool too big"></message>
  150. </compile>
  151. </ajc-test>
  152. <ajc-test dir="bugs/pr59208" pr="59208"
  153. title="Weaver fails in BCEL for large classes (binary)">
  154. <compile
  155. aspectpath="test.jar"
  156. inpath="classes">
  157. <message kind="error" line="0" text="constant pool too big"></message>
  158. </compile>
  159. </ajc-test>
  160. -->
  161. <ajc-test dir="bugs/pr53981" pr="538981"
  162. title="proceed used as method name in around advice (1)">
  163. <compile files="Proceeding1.aj"/>
  164. <run class="Proceeding1"/>
  165. </ajc-test>
  166. <ajc-test dir="bugs/pr53981" pr="538981"
  167. title="proceed used as method name in around advice (2)">
  168. <compile files="Proceeding2.aj"/>
  169. <run class="Proceeding2"/>
  170. </ajc-test>
  171. <ajc-test dir="bugs/pr53981" pr="538981"
  172. title="proceed used as method name in around advice (3)">
  173. <compile files="Proceeding3.aj"/>
  174. <run class="Proceeding3"/>
  175. </ajc-test>
  176. <ajc-test dir="bugs" pr="61572"
  177. title="ITDs on inner classes should be static context">
  178. <compile files="PR61572.aj">
  179. <message kind="error" line="19" text="Cannot make a static reference to the non-static field zzz"></message>
  180. </compile>
  181. </ajc-test>
  182. <ajc-test dir="bugs/oxford" pr="65319"
  183. title="ajc crashes when compiling the following program (binding this() and target())">
  184. <compile files="PR65319.java">
  185. <!-- target comes before this comes before args, and we only report one error -->
  186. <message kind="error" line="23" text="ambiguous binding of parameter(s) x across '||' in pointcut"/>
  187. <message kind="error" line="25" text="ambiguous binding of parameter(s) x across '||' in pointcut"/>
  188. <message kind="error" line="27" text="ambiguous binding of parameter(s) x across '||' in pointcut"/>
  189. <message kind="error" line="29" text="ambiguous binding of parameter(s) x across '||' in pointcut"/>
  190. </compile>
  191. </ajc-test>
  192. <!-- should NOT raise error, despite Oxford expectations to the contrary -->
  193. <ajc-test dir="bugs/oxford" pr="62475"
  194. title="resolution of IT field inits">
  195. <compile files="PR62475.java">
  196. </compile>
  197. </ajc-test>
  198. <ajc-test
  199. dir="bugs/invalidAbsoluteTypeName"
  200. pr="65925"
  201. title="Valid but inaccessible type names should not be flagged by XLint:invalidAbsoluteTypeName">
  202. <compile files="False_InvalidAbsoluteTypeName.java">
  203. <message kind="warning" line="17"/>
  204. </compile>
  205. <run class="False_InvalidAbsoluteTypeName"/>
  206. </ajc-test>
  207. <ajc-test dir="bugs/PR68991" pr="68991"
  208. title="intertype initialisers should match field set pointcuts">
  209. <compile files="Simple.java"/>
  210. <run class="Simple"/>
  211. </ajc-test>
  212. <ajc-test dir="bugs/PR68991" pr="68991"
  213. title="intertype initialisers should match field set pointcuts (oxford testcase)">
  214. <compile files="Oxford.java"/>
  215. <run class="Oxford"/>
  216. </ajc-test>
  217. <ajc-test dir="bugs" pr="54421"
  218. title="Compile time declarations (warning and error) do not accept string concatenation (with +)">
  219. <compile files="decwStrings.java">
  220. <message kind="warning" line="5"/>
  221. <message kind="warning" line="19" text="hello world"/>
  222. <message kind="warning" line="22" text="hello world"/>
  223. <message kind="warning" line="25" text="hello world"/>
  224. <message kind="warning" line="30" text="hello world"/>
  225. <message kind="warning" line="34" text="hello world"/>
  226. <message kind="warning" line="39" text="abcdefghijklmnopqrstuvwxyz"/>
  227. </compile>
  228. </ajc-test>
  229. <ajc-test dir="bugs" pr="54421"
  230. title="Compile time declarations (warning and error) do not accept string concatenation (with +) (2)">
  231. <compile files="decwStringsErroneous.java">
  232. <message kind="error" line="22"/>
  233. </compile>
  234. </ajc-test>
  235. <ajc-test dir="bugs/oxford" pr="61768"
  236. title="scope for inter-type methods">
  237. <compile files="PR61768.java">
  238. <message kind="error" line="37" text="No enclosing instance of type Aspect is accessible"/>
  239. </compile>
  240. </ajc-test>
  241. <ajc-test dir="bugs/doYouHaveVisiblePrivates" pr="71372"
  242. title="NoSuchMethodError calling private method from around advice in inner aspect">
  243. <compile files="PrivateCall.java"/>
  244. <run class="PrivateCall"/>
  245. </ajc-test>
  246. <ajc-test dir="bugs/doYouHaveVisiblePrivates" pr="71372"
  247. title="NoSuchMethodError calling private method from around advice in inner aspect (2)">
  248. <compile files="PrivateCall2.java,PrivateCall3.java"/>
  249. <run class="def.PrivateCall3"/>
  250. </ajc-test>
  251. <ajc-test dir="bugs/doYouHaveVisiblePrivates" pr="71372"
  252. title="NoSuchMethodError calling private method from around advice in inner aspect (3)">
  253. <compile files="PrivateCallInstance.java"/>
  254. <run class="PrivateCallInstance"/>
  255. </ajc-test>
  256. <ajc-test dir="bugs/doYouHaveVisiblePrivates" pr="71372"
  257. title="NoSuchMethodError calling private method from around advice in inner aspect (4)">
  258. <compile files="PrivateCall_Instance_Package1.java,PrivateCall_Instance_Package2.java"/>
  259. <run class="def.PrivateCall_Instance_Package2"/>
  260. </ajc-test>
  261. <ajc-test dir="bugs/privilegedNPE" pr="67579"
  262. title="NPE on privileged aspect error">
  263. <compile files="a/ITD.aj,b/B.aj"/>
  264. <run class="b.B"/>
  265. </ajc-test>
  266. <ajc-test dir="bugs/privilegedNPE" pr="67579"
  267. title="NPE on privileged aspect error (2)">
  268. <compile files="b/B.aj,a/ITD.aj"/>
  269. <run class="b.B"/>
  270. </ajc-test>
  271. <ajc-test dir="bugs/privilegedAccess" pr="67578"
  272. title="Privileged Aspect Access Problem Across Packages">
  273. <compile files="b/B.aj,a/ITD.aj"/>
  274. <run class="b.B"/>
  275. </ajc-test>
  276. <ajc-test dir="bugs/privilegedAccess" pr="67578"
  277. title="Privileged Aspect Access Problem Across Packages (2)">
  278. <compile files="b/B_notPrivileged.aj,a/ITD.aj">
  279. <message kind="error" line="7" text="The method returnNothing(Object) from the type ITD is not visible"/>
  280. </compile>
  281. </ajc-test>
  282. <ajc-test dir="bugs" pr="62642"
  283. title="proper handling of ExceptionInIntializer inside clinit in presence of after throwing advice">
  284. <compile files="pr62642.java"/>
  285. <run class="pr62642"/>
  286. </ajc-test>
  287. <ajc-test dir="bugs" pr="64069"
  288. title="ITD name clashes with private members">
  289. <compile files="PR64069.aj">
  290. <message kind="error" line="5" text="conflicts with existing member"/>
  291. <message kind="error" line="10" text="conflicts with existing member"/>
  292. <message kind="error" line="14" text="conflicts with existing member"/>
  293. <!-- new error expected due to 275032 change - the itd for the ctor will be ignored in the clash case -->
  294. <message kind="error" line="41" text="The constructor A() is not visible"/>
  295. </compile>
  296. </ajc-test>
  297. <ajc-test dir="bugs/pr71723" pr="71723"
  298. title="Inconsistency in scoping of protected members in ITDs">
  299. <compile files="foo/Foo.java,bar/Bar.aj">
  300. <message kind="error" line="8" text="The method i() from the type Foo is not visible"/>
  301. <message kind="error" line="9" text="The method ancientI() from the type Foo is not visible"/>
  302. <message kind="error" line="10" text="The method ancientJ() from the type AncientFoo is not visible"/>
  303. <message kind="error" line="11" text="The method clone() from the type Object is not visible"/>
  304. <message kind="error" line="12" text="Cannot make a static reference to the non-static method clone() from the type Object"/>
  305. </compile>
  306. </ajc-test>
  307. <ajc-test dir="design/sourceLines" pr="37020"
  308. title="wrong line for method execution join point">
  309. <compile files="TestSourceLines.java">
  310. <message kind="warning" line="1" text="static init"/>
  311. <message kind="warning" line="12" text="cons execution"/>
  312. <message kind="warning" line="12" text="pre-init"/>
  313. <message kind="warning" line="12" text="just-init"/>
  314. <message kind="warning" line="16" text="cons execution"/>
  315. <message kind="warning" line="16" text="just-init"/>
  316. <message kind="warning" line="16" text="pre-init"/>
  317. <message kind="warning" line="20" text="method execution"/>
  318. <message kind="warning" line="24" text="method execution"/>
  319. <message kind="warning" line="28" text="method execution"/>
  320. <message kind="warning" line="35" text="static init"/>
  321. <message kind="warning" line="35" text="just-init"/>
  322. <message kind="warning" line="35" text="pre-init"/>
  323. <message kind="warning" line="39" text="pre-init"/>
  324. <message kind="warning" line="39" text="just-init"/>
  325. <message kind="warning" line="39" text="static init"/>
  326. <message kind="warning" line="47" text="advice"/>
  327. </compile>
  328. </ajc-test>
  329. <ajc-test dir="bugs/interfaceITDs" pr="70794"
  330. title="The introduction on interface causes the interface implementation class error (1)">
  331. <compile files="PublicPublic.java"/>
  332. </ajc-test>
  333. <ajc-test dir="bugs/interfaceITDs" pr="70794"
  334. title="The introduction on interface causes the interface implementation class error (2)">
  335. <compile files="PackagePublic.java"/>
  336. </ajc-test>
  337. <ajc-test dir="bugs/interfaceITDs" pr="70794"
  338. title="The introduction on interface causes the interface implementation class error (3)">
  339. <compile files="PackagePackage.java">
  340. <message kind="error" line="17" text="abstract intertype method declaration 'void PackagePackage.world()' on interface PackagePackage must be declared public (compiler limitation)"/>
  341. </compile>
  342. </ajc-test>
  343. <ajc-test dir="bugs/interfaceITDs" pr="70794"
  344. title="The introduction on interface causes the interface implementation class error (4)">
  345. <compile files="PublicPackage.java">
  346. <message kind="error" line="13" text="abstract intertype method declaration 'void PublicPackage.world()' on interface PublicPackage must be declared public (compiler limitation)"/>
  347. </compile>
  348. </ajc-test>
  349. <ajc-test dir="bugs/pr72531" pr="72531"
  350. title="declare warning warns at wrong points">
  351. <compile files="de/rohith/HelloWorld.java,de/rohith/HelloWorldAspect.java,de/rohith/PrinterWorld.java">
  352. <message kind="warning" line="15" text="*[] returning method called"/>
  353. <message kind="warning" line="22" text="*[] returning method called"/>
  354. </compile>
  355. </ajc-test>
  356. <ajc-test dir="bugs" pr="72699"
  357. title="Bogus error message: The abstract method ajc$pointcut$$tracingScope$a2 in type Tracing can only be defined by an abstract class (1)">
  358. <compile files="BogusMessage.java">
  359. <message kind="error" line="2" text="The abstract pointcut tracingScope can only be defined in an abstract aspect"/>
  360. </compile>
  361. </ajc-test>
  362. <ajc-test dir="bugs" pr="72699"
  363. title="Bogus error message: The abstract method ajc$pointcut$$tracingScope$a2 in type Tracing can only be defined by an abstract class (2)">
  364. <compile files="BogusMessage2.java">
  365. <message kind="error" line="1" text="The type BogusMessage2 must be an abstract class to define abstract methods"/>
  366. <message kind="error" line="2" text="The abstract pointcut tracingScope can only be defined in an aspect"/>
  367. </compile>
  368. </ajc-test>
  369. <ajc-test dir="bugs/pr70404" pr="70404"
  370. title="passing null to array arguments confuzes static join point signature. (1)">
  371. <compile files="Main.java,MainAspect.java"/>
  372. <run class="dk.infimum.aspectjtest.Main"/>
  373. </ajc-test>
  374. <ajc-test dir="bugs/pr70404" pr="70404"
  375. title="passing null to array arguments confuzes static join point signature. (2)">
  376. <compile files="Main2.java,MainAspect.java"/>
  377. <run class="dk.infimum.aspectjtest.Main2"/>
  378. </ajc-test>
  379. <ajc-test dir="bugs" pr="72528"
  380. title="around advice throws java.lang.VerifyError at runtime">
  381. <compile files="ArrayCloning.java"/>
  382. <run class="ArrayCloning"/>
  383. </ajc-test>
  384. <ajc-test dir="bugs" pr="72157"
  385. title="declare soft can cause programs with invalid exception behaviour to be generated">
  386. <compile files="PR72157.java">
  387. <message kind="error" line="13" text="Unhandled"/>
  388. </compile>
  389. </ajc-test>
  390. <ajc-test
  391. dir="bugs"
  392. pr="75129"
  393. title="NPE on thisJoinPoint mistake">
  394. <compile files="TjpMistake.java">
  395. <message kind="error" line="22"/>
  396. </compile>
  397. </ajc-test>
  398. <ajc-test dir="cflow" pr="76030" title="Optimization of cflow - counters (1)">
  399. <compile files="CounterTest01.java"/>
  400. <run class="CounterTest01"/>
  401. </ajc-test>
  402. <ajc-test dir="cflow" pr="76030" title="Optimization of cflow - shared counters (2)">
  403. <compile files="CounterTest02.java"/>
  404. <run class="CounterTest02"/>
  405. </ajc-test>
  406. <ajc-test dir="cflow" pr="76030" title="Optimization of cflow - shared stacks (3)">
  407. <compile files="CounterTest03.java"/>
  408. <run class="CounterTest03"/>
  409. </ajc-test>
  410. <ajc-test dir="cflow" pr="76030" title="Optimization of cflow - counters (4)">
  411. <compile files="CounterTest04.java"/>
  412. <run class="CounterTest04"/>
  413. </ajc-test>
  414. <ajc-test dir="cflow" pr="76030" title="Optimization of cflow - counters with abstract pointcuts (5)">
  415. <compile files="CounterTest05.java"/>
  416. <run class="CounterTest05"/>
  417. </ajc-test>
  418. <ajc-test dir="bugs/pr76096" pr="76096" title="Anonymous classes unaware of introductions into abstract classes">
  419. <compile files="ConcreteClassA.java"/>
  420. <run class="ConcreteClassA"/>
  421. </ajc-test>
  422. <ajc-test dir="bugs" pr="74952" title="before,after not (cflow(within(Trace*))) prints nothing">
  423. <compile files="WhatsGoingOn.java"/>
  424. <run class="WhatsGoingOn"/>
  425. </ajc-test>