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.

ajc11-tests.xml 30KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837
  1. <!-- AspectJ v1.1.x Tests -->
  2. <ajc-test dir="new" pr="853"
  3. title="declare interface extends class">
  4. <compile files="DeclareInterfaceExtendsClass.java">
  5. <message kind="error" line="10"/>
  6. </compile>
  7. </ajc-test>
  8. <ajc-test dir="new" pr="853"
  9. title="declare interface implements class">
  10. <compile files="DeclareInterfaceImplementsClass.java">
  11. <message kind="error" line="10"/>
  12. </compile>
  13. </ajc-test>
  14. <ajc-test dir="new" pr="823"
  15. title="declaring a private method on an inner interface"
  16. keywords="tofix">
  17. <compile files="PrivateMethodOnInnerInterface.java"/>
  18. <run class="PrivateMethodOnInnerInterface"/>
  19. </ajc-test>
  20. <ajc-test dir="new" pr="829"
  21. title="CE expected when declaring fields on arrays" keywords="tofix">
  22. <compile files="ArrayFieldDeclarationCE.java">
  23. <message kind="error" line="14"/>
  24. </compile>
  25. </ajc-test>
  26. <ajc-test dir="new" pr="883"
  27. title="signature of handler join point">
  28. <compile files="HandlerSignature.java"/>
  29. <run class="HandlerSignature"/>
  30. </ajc-test>
  31. <ajc-test dir="new" pr="885"
  32. title="source locations within expressions">
  33. <compile files="SourceLocationWithinExpr.java"/>
  34. <run class="SourceLocationWithinExpr"/>
  35. </ajc-test>
  36. <ajc-test dir="new" pr="888"
  37. title="crashes given method in declared method">
  38. <compile files="DeclareMethodCE.java">
  39. <message kind="error" line="8"/>
  40. </compile>
  41. </ajc-test>
  42. <ajc-test dir="new" pr="889"
  43. title="after returning advice on interface constructor">
  44. <compile files="AfterReturningInterfaceConstructor.java"/>
  45. <run class="AfterReturningInterfaceConstructor"/>
  46. </ajc-test>
  47. <ajc-test dir="new" pr="889"
  48. title="after returning advice on interface constructor - error">
  49. <compile files="AfterReturningInterfaceConstructorCE.java">
  50. <message kind="error" line="26"/>
  51. <message kind="warning" line="30"/>
  52. </compile>
  53. </ajc-test>
  54. <ajc-test dir="bugs" pr="900"
  55. title="after advice on static call join point">
  56. <compile files="AfterStaticCall.java"/>
  57. <run class="AfterStaticCall"/>
  58. </ajc-test>
  59. <ajc-test dir="bugs" pr="901"
  60. title="incompatible class change error"
  61. comment="XXX Jim and Erik found/fixed this - need basis">
  62. <compile files="IncompatibleClassChangeErrorBug.java"/>
  63. <run class="IncompatibleClassChangeErrorBug"/>
  64. </ajc-test>
  65. <ajc-test dir="bugs" pr="903"
  66. title="simple cflow of method execution">
  67. <compile files="ExecutionCflow.java"/>
  68. <run class="ExecutionCflow"/>
  69. </ajc-test>
  70. <ajc-test dir="bugs" pr="909"
  71. title="using instance as class reference to constant field"
  72. comment="XXX need to verify run">
  73. <compile files="InstanceAsClassRefToConstant.java"/>
  74. </ajc-test>
  75. <ajc-test dir="new" pr="774"
  76. title="interface self-reference in anonymous instance">
  77. <compile files="AnonymousSelfReference.java"/>
  78. <run class="AnonymousSelfReference"/>
  79. </ajc-test>
  80. <ajc-test dir="new" pr="776"
  81. title="self-reference from (aspect-declared) method-local class">
  82. <compile files="MethodSelfReference.java"/>
  83. <run class="MethodSelfReference"/>
  84. </ajc-test>
  85. <ajc-test dir="new" title="expect CE for unterminated declare error">
  86. <compile files="UnterminatedDeclareErrorCE.java">
  87. <message kind="error" line="4"/>
  88. </compile>
  89. </ajc-test>
  90. <ajc-test dir="new"
  91. title="expect CE for declaration collision between subaspects instead of domination order">
  92. <compile files="DeclarationCollisionCE.java">
  93. <message kind="error" line="10"/>
  94. <message kind="error" line="20"/>
  95. <message kind="error" line="27"/>
  96. </compile>
  97. </ajc-test>
  98. <ajc-test dir="new"
  99. title="subtype pattern in dominates should pick out aspect subtypes">
  100. <compile files="DominatesTypePattern.java"/>
  101. <run class="DominatesTypePattern"/>
  102. </ajc-test>
  103. <ajc-test dir="new"
  104. title="subtype pattern in dominates will conflict with type pattern">
  105. <compile files="DominatesTypePatternCE.java">
  106. <message kind="error" line="15"/>
  107. </compile>
  108. </ajc-test>
  109. <ajc-test dir="new" pr="827"
  110. title="after returning advice on interface and implementation constructor"
  111. keywords="tofix">
  112. <compile files="AfterReturningConstructor.java"/>
  113. <run class="AfterReturningConstructor"/>
  114. </ajc-test>
  115. <ajc-test dir="new" pr="832"
  116. title="after throwing advice with non-throwable formal">
  117. <compile files="AfterThrowingNonThrowable.java">
  118. <message kind="error" line="41"/>
  119. </compile>
  120. </ajc-test>
  121. <ajc-test dir="new" pr="829" title="declare array field using postfix"
  122. keywords="tofix">
  123. <compile files="ArrayFieldDeclaration.java">
  124. <message kind="error" line="17"/>
  125. </compile>
  126. </ajc-test>
  127. <ajc-test dir="new" pr="851"
  128. title="prohibit declaring new aspect constructor with arguments">
  129. <compile files="DeclareAspectConstructorCE.java">
  130. <message kind="error" line="10"/>
  131. </compile>
  132. </ajc-test>
  133. <ajc-test dir="new" pr="851"
  134. title="prohibit declaring only aspect constructor with arguments">
  135. <compile files="DeclareOnlyAspectConstructorCE.java">
  136. <message kind="error" line="10"/>
  137. </compile>
  138. </ajc-test>
  139. <!-- The follwing three idioms are allowed. Within a declare parents,
  140. implements and extends can be used interchangably. We could
  141. provide -Xlint style warnings for misuse.
  142. -->
  143. <ajc-test dir="new" pr="853"
  144. title="declare class extends interface">
  145. <compile files="DeclareClassExtendsInterface.java">
  146. </compile>
  147. </ajc-test>
  148. <ajc-test dir="new" pr="853"
  149. title="declare class implements class">
  150. <compile files="DeclareClassImplementsClass.java">
  151. </compile>
  152. </ajc-test>
  153. <ajc-test dir="new" pr="853"
  154. title="declare interface implements interface">
  155. <compile files="DeclareInterfaceImplementsInterface.java">
  156. </compile>
  157. </ajc-test>
  158. <ajc-test dir="new"
  159. title="if and cflow arg binding">
  160. <compile files="CflowBinding.java">
  161. <message kind="error" line="13"/>
  162. </compile>
  163. </ajc-test>
  164. <ajc-test dir="bugs" pr="902"
  165. title="circularity in declare dominates">
  166. <compile files="CircularDominates.java">
  167. <message kind="error" line="18"/>
  168. </compile>
  169. </ajc-test>
  170. <ajc-test dir="bugs" pr="28702" title="percflow code hangs compiler">
  171. <compile files="CloseConnectionsCflow.java">
  172. </compile>
  173. </ajc-test>
  174. <ajc-test dir="bugs" pr="28852"
  175. title="Verification error tracing constructor that takes arguments">
  176. <compile files="ConstructorArgTracing.java"/>
  177. <run class="ConstructorArgTracing"/>
  178. </ajc-test>
  179. <ajc-test dir="bugs" pr="29106" title="declared exceptions in inter-type decls">
  180. <compile files="ExceptionsOnInters.java"/>
  181. <run class="ExceptionsOnInters"/>
  182. </ajc-test>
  183. <ajc-test dir="bugs" pr="28921"
  184. title="Verify error on non-Throwable in declare soft">
  185. <compile files="DeclareSoftCf.java" options="-Xlint:warning">
  186. <message kind="warning" line="28"/>
  187. <message kind="error" line="29"/>
  188. <!--message kind="warning"/-->
  189. </compile>
  190. </ajc-test>
  191. <ajc-test dir="bugs" pr="29113" title="inter-type fields with array types">
  192. <compile files="InterFieldArrays.java"/>
  193. <run class="InterFieldArrays"/>
  194. </ajc-test>
  195. <ajc-test dir="new" pr="838"
  196. title="checking around join point for advice return type - numeric">
  197. <compile files="AroundNumericCastCE.java">
  198. <message kind="error" line="11"/>
  199. <message kind="error" line="17"/>
  200. </compile>
  201. </ajc-test>
  202. <ajc-test dir="new" pr="836" title="void around advice without proceed">
  203. <compile files="VoidAround.java">
  204. <message kind="error" line="11"/>
  205. <message kind="error" line="29"/>
  206. </compile>
  207. </ajc-test>
  208. <ajc-test dir="new/PR852" pr="852"
  209. title="declaring method on superclass and subclass">
  210. <compile files="aspectPack/Aspect.java,target/SubClass.java,target/SuperClass.java">
  211. <dir-changes added="target.SubClass,target.SuperClass"/>
  212. </compile>
  213. <run class="aspectPack.Aspect"/>
  214. </ajc-test>
  215. <ajc-test dir="new/finalfield" pr="28974"
  216. title="introducing final fields (simple)">
  217. <compile files="Introducer.java,Receiver.java,User1.java"/>
  218. <run class="User1"/>
  219. </ajc-test>
  220. <ajc-test dir="new/finalfield" pr="28974"
  221. title="introducing final fields and using as constants">
  222. <compile files="Introducer.java,Receiver.java,User2.java"/>
  223. <run class="User2"/>
  224. </ajc-test>
  225. <ajc-test dir="new/finalfield" pr="28974"
  226. title="introducing final fields and checking errors">
  227. <compile files="Introducer.java,Receiver.java,UserCf.java">
  228. <message kind="error" line="6"/>
  229. </compile>
  230. </ajc-test>
  231. <ajc-test dir="bugs" pr="29691"
  232. title="Static inner aspects cannot reference user defined pointcuts">
  233. <compile files="PcdLookup.java" />
  234. <run class="PcdLookup"/>
  235. </ajc-test>
  236. <ajc-test dir="bugs" pr="29691"
  237. title="Static inner aspects cannot reference user defined pointcuts">
  238. <compile files="SoftWithin.java" />
  239. <run class="SoftWithin"/>
  240. </ajc-test>
  241. <ajc-test dir="bugs" pr="29689"
  242. title="Declare precedence should not allow multiple * patterns">
  243. <compile files="CircularPrecedence.java">
  244. <message kind="error" line="14"/>
  245. </compile>
  246. </ajc-test>
  247. <ajc-test dir="bugs" pr="29662"
  248. title="VerifyError on accessing objects not accessible to the weaver">
  249. <compile files="AroundAccess.java">
  250. </compile>
  251. <run class="AroundAccess"/>
  252. </ajc-test>
  253. <ajc-test dir="new" pr="804"
  254. title="aspect static initializers should run before instance constructed"
  255. keywords="tofix">
  256. <compile files="AspectStaticInit.java"/>
  257. <run class="AspectStaticInit"/>
  258. </ajc-test>
  259. <ajc-test dir="bugs" pr="29959"
  260. title="super call in intertype method declaration body causes VerifyError">
  261. <compile files="SuperToIntro.java"/>
  262. <run class="SuperToIntro"/>
  263. </ajc-test>
  264. <ajc-test dir="bugs/crashes" pr="30168"
  265. title="Error with certain combination of advice">
  266. <compile files="test/Test3.java"/>
  267. <run class="test.Test3"/>
  268. </ajc-test>
  269. <ajc-test dir="bugs" pr="31423"
  270. title="Pointcut adviceexecution() does not work">
  271. <compile files="AdviceExec.java"/>
  272. <run class="AdviceExec"/>
  273. </ajc-test>
  274. <ajc-test dir="bugs" pr="30026"
  275. title="problems with finalize call">
  276. <compile files="Finalizer.java">
  277. <message kind="error" line="22"/>
  278. </compile>
  279. </ajc-test>
  280. <ajc-test dir="bugs" pr="33635"
  281. title="Negation of if pointcut does not work">
  282. <compile files="NotIf.java"/>
  283. <run class="NotIf"/>
  284. </ajc-test>
  285. <ajc-test dir="bugs" pr="32463"
  286. title="ajc reports error when encountering static declaration of nested classes">
  287. <compile files="WeaveLocal.java"/>
  288. <run class="WeaveLocal"/>
  289. </ajc-test>
  290. <ajc-test dir="bugs" pr="32428"
  291. title="can't use pointcuts defined in inner aspects ">
  292. <compile files="InnerPointcut.java"/>
  293. <run class="InnerPointcut"/>
  294. </ajc-test>
  295. <ajc-test dir="bugs/interfaceNames" pr="32421"
  296. title="can't resolve nested public interfaces (also PR#32399)">
  297. <compile files="TransactionTest.java,sub/ExecutionMonitor.java,sub/ObserverProtocol.aj"/>
  298. <run class="TransactionTest"/>
  299. </ajc-test>
  300. <ajc-test dir="bugs" pr="34210"
  301. title="thisJoinPoint.getArgs() causes IncompatibleClassChangeError">
  302. <compile files="ThisJoinPointAndVerifier.java"/>
  303. <run class="ThisJoinPointAndVerifier"/>
  304. </ajc-test>
  305. <ajc-test dir="errors" keywords="error"
  306. title="inter-type declaration of void field">
  307. <compile files="VoidFieldDeclarationCE.java">
  308. <message kind="error" line="7"/>
  309. </compile>
  310. </ajc-test>
  311. <ajc-test dir="binding"
  312. title="no such constructor for proceed argument (error)">
  313. <compile files="UnfoundConstructor.java">
  314. <message kind="error" line="25"/>
  315. </compile>
  316. </ajc-test>
  317. <ajc-test dir="new/declare" pr="31724"
  318. title="omnibus declare warning context with no initializer/constructor">
  319. <compile files="DeclareWarningEmpty.java">
  320. <message kind="warning" line="3" text="2 - initialization(DeclareWarningEmpty)"/>
  321. <message kind="warning" line="3" text="1 - staticinitialization(DeclareWarningEmpty)"/>
  322. </compile>
  323. </ajc-test>
  324. <ajc-test dir="new/declare" pr="31724"
  325. title="omnibus declare warning context">
  326. <compile files="DeclareWarning.java">
  327. <message kind="warning" line="3" text="staticinitialization(DeclareWarning)"/>
  328. <message kind="warning" line="12" text="call(DeclareWarning.new())"/>
  329. <message kind="warning" line="13" text="get staticInt"/>
  330. <message kind="warning" line="14" text="get instanceInt"/>
  331. <message kind="warning" line="15" text="set staticInt"/>
  332. <message kind="warning" line="16" text="set instanceInt"/>
  333. <message kind="warning" line="17" text="call(void run())"/>
  334. <message kind="warning" line="18" text="call(void irun())"/>
  335. <message kind="warning" line="21" text="execution(void run())"/>
  336. <message kind="warning" line="22" text="execution(void irun())"/>
  337. <message kind="warning" line="23" text="execution(DeclareWarning.new())"/>
  338. <message kind="warning" line="23" text="initialization(DeclareWarning)"/>
  339. <message kind="warning" line="33" text="handler(OutOfMemoryError) &amp;&amp; within(DeclareWarning)"/>
  340. <message kind="warning" line="36" text="handler(Error)"/>
  341. <message kind="warning" line="39" text="handler(RuntimeException) &amp;&amp; withincode(DeclareWarning.new())"/>
  342. <message kind="warning" line="72" text="adviceExecution() &amp;&amp; within(A)"/>
  343. </compile>
  344. </ajc-test>
  345. <ajc-test dir="bugs" pr="34858"
  346. title="cflow binding issues with ignoring state">
  347. <compile files="CflowBinding.java"/>
  348. <run class="CflowBinding"/>
  349. </ajc-test>
  350. <ajc-test dir="bugs" pr="34858"
  351. title="cflow binding -- original weaver crash">
  352. <compile files="CflowBindingOrig.java"/>
  353. <run class="CflowBindingOrig"/>
  354. </ajc-test>
  355. <ajc-test dir="errors"
  356. title="type not imported in around advice">
  357. <compile files="TypeNotImportedInAroundCE.java">
  358. <message kind="error" line="10"/>
  359. </compile>
  360. </ajc-test>
  361. <ajc-test dir="errors"
  362. title="type not imported in aspect">
  363. <compile files="TypeInAspectNotImportedCE.java">
  364. <message kind="error" line="6"/>
  365. </compile>
  366. </ajc-test>
  367. <ajc-test dir="errors" keywords="error"
  368. title="class extending abstract aspect">
  369. <compile files="ClassExtendingAbstractAspectCE.java">
  370. <message kind="error" line="20"/>
  371. </compile>
  372. </ajc-test>
  373. <ajc-test dir="bugs" pr="34925"
  374. title="declare soft and throw statements">
  375. <compile files="ConvertToUnchecked.java" options="-Xlint:ignore"/>
  376. <run class="ConvertToUnchecked"/>
  377. </ajc-test>
  378. <ajc-test dir="bugs/interAbstract"
  379. title="inter-type declaration bug with abstract classes"
  380. pr="36046">
  381. <compile files="Driver.java"/>
  382. <run class="Driver"/>
  383. </ajc-test>
  384. <ajc-test dir="bugs/interInherit" pr="35725"
  385. title="Inter type declaration to base class not seen by derived class">
  386. <compile files="a_impl/AImpl.java,a_impl/Af.java,a_intf/A.java,b_impl/BImpl.java,b_intf/B.java"/>
  387. <run class="b_impl.BImpl"/>
  388. </ajc-test>
  389. <ajc-test dir="new/declareParents"
  390. title="Declare parents with intermediate ancestor"
  391. keywords="from-new">
  392. <compile files="Driver.java"/>
  393. <run class="Driver"/>
  394. </ajc-test>
  395. <ajc-test dir="new/declareParents"
  396. title="Declare parents removing ancestor"
  397. keywords="from-new">
  398. <compile files="IllegalAdoption.java">
  399. <message kind="error" line="13"/>
  400. </compile>
  401. </ajc-test>
  402. <ajc-test dir="bugs/interSpecials" title="IllegalAccessError while accessing introduced variable / 1.1rc1"
  403. pr="36110">
  404. <compile files="p1/C.java,p2/A1.java"/>
  405. <run class="p2.A1"/>
  406. </ajc-test>
  407. <ajc-test dir="new" pr="36736"
  408. title="implemented abstract pointcut">
  409. <compile files="AbstractImplementedPointcut.java">
  410. <message kind="error" line="14"/>
  411. </compile>
  412. </ajc-test>
  413. <ajc-test dir="new/verifyError" pr="36673"
  414. title="privileged aspect main verify error">
  415. <compile files="Privilege.java"/>
  416. <run class="Privilege"/>
  417. </ajc-test>
  418. <ajc-test dir="bugs" pr="36564"
  419. title="Internal compiler error with thisJoinPoint.getStaticPart()">
  420. <compile files="tjpStaticPart/Test.java,tjpStaticPart/Exceptions.java" options="-Xlint:ignore"/>
  421. <run class="tjpStaticPart.Test"/>
  422. </ajc-test>
  423. <ajc-test dir="bugs" pr="29665"
  424. title="Inconsistant stack height with around">
  425. <compile files="StackError.java" options="-Xlint:ignore"/>
  426. <run class="StackError"/>
  427. </ajc-test>
  428. <ajc-test dir="bugs/messyAround" pr="36056"
  429. title="Ajc 1.1 rc1 java.lang.VerifyError with messy arounds">
  430. <compile files="aspects/Trace.aj,cap/OptionList.java,DebugTrace.aj">
  431. <message kind="warning" line="102"/>
  432. <message kind="warning" line="124"/>
  433. <message kind="warning" line="138"/>
  434. </compile>
  435. <run class="cap.OptionList"/>
  436. </ajc-test>
  437. <ajc-test dir="new"
  438. title="try/finally in around advice (same as ...messy arounds?)">
  439. <compile files="TryFinallyInAround.java"/>
  440. <run class="TryFinallyInAround"/>
  441. </ajc-test>
  442. <ajc-test dir="new" pr="36778"
  443. title="advise join points in subclass of empty interface">
  444. <compile files="EmptyInterface.java"/>
  445. <run class="EmptyInterface"/>
  446. </ajc-test>
  447. <ajc-test dir="new" pr="36778"
  448. title="can't put around advice on interface static initializer"
  449. comment="this tests for a nice message given a compiler limitation">
  450. <compile files="EmptyInterfaceCE.java">
  451. <message kind="error" line="20"/>
  452. <message kind="error" line="23"/>
  453. </compile>
  454. </ajc-test>
  455. <ajc-test dir="bugs" pr="36803"
  456. title="cflow concretization causing assertion failure">
  457. <compile files="CflowConcrete.java"/>
  458. <run class="CflowConcrete"/>
  459. </ajc-test>
  460. <ajc-test dir="bugs" title="lame error message: negation doesn't allow binding"
  461. pr="30663">
  462. <compile files="BadBindingError.java">
  463. <message kind="error" line="7"/>
  464. </compile>
  465. </ajc-test>
  466. <ajc-test dir="bugs/interSpecials" pr="36936"
  467. title="Error when introducing members of type Class">
  468. <compile files="Trg.java,Asp.java"/>
  469. <run class="Trg"/>
  470. </ajc-test>
  471. <ajc-test dir="new"
  472. comment="this is a pureJava test, but we always want to run it"
  473. title="arrays via Class.forName()">
  474. <compile files="ClassForName.java"/>
  475. <run class="ClassForName"/>
  476. </ajc-test>
  477. <ajc-test dir="bugs/inlineAround" pr="37152"
  478. title="perthis and inline arounds">
  479. <compile files="aspect1/Base.java,aspect2/Concrete.java,p1/Main.java">
  480. </compile>
  481. <run class="p1.Main"/>
  482. </ajc-test>
  483. <ajc-test dir="bugs" pr="37325"
  484. title="Weaver fails with NPE for very large source files ">
  485. <compile files="LongFile.java"/>
  486. <run class="LongFile"/>
  487. </ajc-test>
  488. <ajc-test dir="harness" keywords="command-line-error"
  489. title="CLE: no sources">
  490. <compile badInput="true">
  491. <message kind="error" text="no sources"/>
  492. <message kind="abort" text="Usage"/>
  493. </compile>
  494. </ajc-test>
  495. <ajc-test dir="harness"
  496. keywords="command-line-error,knownLimitation-ajctaskCompiler,knownLimitation-ajdeCompiler"
  497. comment="ajde omits usage"
  498. title="CLE: bad filename">
  499. <compile badInput="true" files="NoSuchFile.java">
  500. <message kind="error" text="NoSuchFile.java"/>
  501. <message kind="abort" text="Usage"/>
  502. </compile>
  503. </ajc-test>
  504. <ajc-test dir="harness" keywords="command-line-error"
  505. comment="XXX test skipped - harness ignores -sourceroot option"
  506. title="CLE: no dir specified for sourceroots">
  507. <compile badInput="true" files="ErrorTest.java"
  508. options="-sourceroots">
  509. <message kind="error" text="no sources specified"/>
  510. <message kind="error" text="bad sourceroot"/>
  511. <message kind="abort" text="Usage"/>
  512. </compile>
  513. </ajc-test>
  514. <ajc-test dir="harness" keywords="command-line-error,knownLimitation-ajdeCompiler"
  515. comment="ajde has same errors, different wording"
  516. title="CLE: no sourceroot specified for incremental">
  517. <compile badInput="true" options="-incremental">
  518. <message kind="error" text="no sources specified"/>
  519. <message kind="error" text="specify a source root"/>
  520. <message kind="abort" text="Usage"/>
  521. </compile>
  522. </ajc-test>
  523. <ajc-test dir="harness" keywords="command-line-error,knownLimitation-ajdeCompiler"
  524. comment="ajde has same errors, different wording"
  525. title="CLE: file specified with incremental">
  526. <compile badInput="true" files="ErrorTest.java"
  527. options="-incremental">
  528. <message kind="error" text="incremental mode only handles source files using -sourceroots"/>
  529. <message kind="error" text="no sources specified"/>
  530. <message kind="error" text="specify a source root"/>
  531. <message kind="abort" text="Usage"/>
  532. </compile>
  533. </ajc-test>
  534. <ajc-test dir="bugs" pr="37304"
  535. title="public static fields being ignored">
  536. <compile files="FinalFields.java"/>
  537. <run class="FinalFields"/>
  538. </ajc-test>
  539. <!-- This doesn't actually reproduce the bug, but no test case has been submitted
  540. that does so this is here as a place-holder and to verify that we're mostly
  541. working.
  542. -->
  543. <ajc-test dir="bugs/accessMethods" pr="38212"
  544. title="can not resolve this member warning">
  545. <compile files="p1/Base.java,p2/Derived.java"/>
  546. <run class="p2.Derived"/>
  547. </ajc-test>
  548. <ajc-test dir="bugs" pr="38345"
  549. title="try switch VerifyError, InconsistentStackHeight">
  550. <compile files="TrySwitch.java"/>
  551. <run class="TrySwitch"/>
  552. </ajc-test>
  553. <ajc-test dir="bugs" pr="39458"
  554. title="Compiler crash in ajc 1.1 - terrible error for inaccessible constructor">
  555. <compile files="NewVoid.java">
  556. <message kind="error" line="17"/>
  557. <message kind="error" line="20"/>
  558. <message kind="error" line="21"/>
  559. <message kind="error" line="28"/>
  560. <message kind="warning" line="29"/>
  561. <message kind="warning" line="30"/>
  562. </compile>
  563. </ajc-test>
  564. <ajc-test dir="bugs" pr="39460"
  565. title="Missing import crashes compiler">
  566. <compile files="MissingImport.java">
  567. <message kind="error" line="13" text="InvocationTargetException cannot be resolved to a type"/>
  568. <!-- this error has 'gone' in e37 upgrade <message kind="error" line="14" text="e cannot be resolved"/> -->
  569. </compile>
  570. </ajc-test>
  571. <ajc-test dir="bugs" pr="39479"
  572. title="NPE in bcel.LazyMethodGen when delegating from one ctor to a second that includes a switch">
  573. <compile files="NewSwitch.java"/>
  574. <run class="NewSwitch"/>
  575. </ajc-test>
  576. <ajc-test dir="bugs" pr="40109"
  577. title="switch statement in aspects crashes weaving">
  578. <compile files="SwitchInAround.java"/>
  579. <run class="SwitchInAround"/>
  580. </ajc-test>
  581. <ajc-test dir="bugs" pr="39993"
  582. title="ajc stack trace on declaring hashcode() method in aspect">
  583. <compile files="OverridingInterfaceObjectMethod.java"/>
  584. <run class="OverridingInterfaceObjectMethod"/>
  585. </ajc-test>
  586. <ajc-test dir="bugs"
  587. title="using super in method introduced on interface with multiple supertypes">
  588. <compile files="MultipleSuperCf.java">
  589. <message kind="error" line="14"/>
  590. </compile>
  591. </ajc-test>
  592. <ajc-test dir="bugs/cflowAndJar" pr="39462"
  593. title="Compiler crashes in jar and cflow (with no .jar)">
  594. <compile files="TestAspect.aj,Test.java,AbstractAspect.aj">
  595. <message kind="warning" line="16"/>
  596. </compile>
  597. <run class="Test"/>
  598. </ajc-test>
  599. <ajc-test dir="bugs/cflowAndJar" pr="39462"
  600. title="Compiler crashes in jar and cflow (with .jar)"
  601. comment="make lib.jar with ajc -outjar lib.jar AbstractAspect.aj">
  602. <compile files="TestAspect.aj,Test.java" aspectpath="lib.jar">
  603. <message kind="warning" line="16"/>
  604. </compile>
  605. <run class="Test"/>
  606. </ajc-test>
  607. <ajc-test dir="bugs" pr="40589"
  608. title="Default method impl for interface causes internal exception.">
  609. <compile files="CloneMethod.java"/>
  610. <run class="CloneMethod"/>
  611. </ajc-test>
  612. <ajc-test dir="errors"
  613. title="compile error expected for abstract pointcut outside abstract aspect">
  614. <compile files="AbstractPointcutCE.java">
  615. <message kind="error" line="4" text="The type C must be an abstract class to define abstract methods"/>
  616. <message kind="error" line="5"/>
  617. <message kind="error" line="10"/>
  618. </compile>
  619. </ajc-test>
  620. <ajc-test dir="bugs"
  621. pr="40876"
  622. title="subtype-qualified pointcut reference">
  623. <compile files="PointcutLibraryTest.java"/>
  624. <run class="PointcutLibraryTest"/>
  625. </ajc-test>
  626. <ajc-test dir="bugs"
  627. pr="40858"
  628. comment="super is not permitted in pointcuts in 1.1"
  629. title="weaver trace on mis-qualified pointcut reference">
  630. <compile files="SuperPointcutCE.java">
  631. <message kind="error" line="23"/>
  632. <message kind="error" line="26"/>
  633. </compile>
  634. </ajc-test>
  635. <ajc-test dir="bugs"
  636. pr="40814"
  637. title="compile error expected for interface pointcuts">
  638. <compile files="AbstractPointcutCE.java">
  639. <message kind="error" line="14" text="The type Concrete must be an abstract class to define abstract methods"/>
  640. <message kind="error" line="7"/>
  641. <message kind="error" line="11"/>
  642. <message kind="error" line="15"/>
  643. </compile>
  644. </ajc-test>
  645. <ajc-test dir="bugs"
  646. pr="40805"
  647. title="interface call signatures when declaring method in aspect">
  648. <compile files="DeclareWarningAndInterfaceMethodCW.java">
  649. <message kind="warning" line="27" text="call getSomething"/>
  650. <message kind="warning" line="27" text="call ICanGetSomething.getSomething"/>
  651. <message kind="warning" line="31" text="call getSomething"/>
  652. <message kind="warning" line="31" text="call ICanGetSomething.getSomething"/>
  653. <message kind="warning" line="33" text="call getSomething"/>
  654. <message kind="warning" line="33" text="call ICanGetSomething.getSomething"/>
  655. <message kind="warning" line="35" text="call getSomething"/>
  656. <message kind="warning" line="35" text="call ICanGetSomething.getSomething"/>
  657. <message kind="warning" line="38" text="call getSomething"/>
  658. <message kind="warning" line="38" text="call ICanGetSomething.getSomething"/>
  659. </compile>
  660. </ajc-test>
  661. <ajc-test dir="bugs"
  662. pr="41175"
  663. title="reflective check of declared exceptions from aspect-declared methods">
  664. <compile files="DeclaredExceptions.java"/>
  665. <run class="DeclaredExceptions"/>
  666. </ajc-test>
  667. <ajc-test dir="bugs/throwsSignature"
  668. pr="42539"
  669. title="throw derivative pointcuts not advised">
  670. <compile files="ExceptionBugTest.java,ExceptionAspect.java">
  671. <message line="5" kind="warning" text="throws both"/>
  672. <message line="5" kind="error" text="throws Exception"/>
  673. <message line="7" kind="warning" text="throws both"/>
  674. </compile>
  675. </ajc-test>
  676. <ajc-test dir="bugs" pr="42652"
  677. title="perthis and signature bad interaction">
  678. <compile files="InterPerCall.java"/>
  679. <run class="InterPerCall"/>
  680. </ajc-test>
  681. <ajc-test dir="bugs/declareBinding"
  682. pr="42740"
  683. title="declare error fails on pointcuts composed from multiple classes">
  684. <compile files="SampleExceptionHandling1.java">
  685. <message line="2" kind="error" text="no checked exceptions"/>
  686. </compile>
  687. </ajc-test>
  688. <ajc-test dir="bugs/declareSoftWithin"
  689. pr="42740"
  690. title="declare error fails on pointcuts composed from multiple classes">
  691. <compile files="aspects/Softener.aj,test/NoSoftener.java"/>
  692. <run class="test.NoSoftener"/>
  693. </ajc-test>
  694. <ajc-test dir="bugs" pr="42993"
  695. title="Interaction between pointcut binding and declare parents">
  696. <compile files="ParentsAndPointcuts.java"/>
  697. <run class="ParentsAndPointcuts"/>
  698. </ajc-test>
  699. <ajc-test dir="bugs" pr="43194"
  700. title="Non-functional concretezation of ReferencePointcut">
  701. <compile files="AdviceInteraction.java"/>
  702. <run class="AdviceInteraction"/>
  703. </ajc-test>
  704. <ajc-test dir="bugs/extdirs"
  705. pr="42574"
  706. title="zip and jar suffixes for extdirs entries">
  707. <compile files="extdirs-src/main/Main.java"
  708. extdirs="lib/lowercase"/>
  709. </ajc-test>