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.

ajc120-tests.xml 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
  1. <!-- AspectJ v1.2.0 Tests -->
  2. <ajc-test dir="bugs/concretizeNpe" pr="43033"
  3. title="NPE in concretization error path"
  4. keywords="poorErrorMessages">
  5. <compile files="base/ExceptionHandling.java,model/ModelExceptionHandling.java">
  6. <!--
  7. <message line="5" kind="error" text="pointcut base.ExceptionHandling.scope() is abstract"/>
  8. <message line="4" kind="error" text="inherited abstract pointcut base.ExceptionHandling.scope() is not made concrete"/>
  9. <message line="8" kind="error" text="inherited abstract pointcut base.ExceptionHandling.scope() is not made concrete"/>
  10. <message line="12" kind="error" />
  11. <message line="13" kind="error" />
  12. -->
  13. <message line="12" kind="error" />
  14. <message line="13" kind="error" />
  15. </compile>
  16. </ajc-test>
  17. <ajc-test dir="bugs/privilege/packageProtected" pr="42711"
  18. title="priviledged aspects calling methods from advice">
  19. <compile files="concern/ContextUser.java,concern/BaseTarget.java,core/Base.java" />
  20. </ajc-test>
  21. <ajc-test dir="bugs" pr="49457"
  22. title="No error on overloaded pointcuts in class">
  23. <compile files="OverloadedPointcutsInClass.java">
  24. <message kind="error" line="3" text="duplicate pointcut name: pc1"/>
  25. <message kind="error" line="4" text="duplicate pointcut name: pc1"/>
  26. <message kind="error" line="6" text="duplicate pointcut name: pc2"/>
  27. <message kind="error" line="7" text="duplicate pointcut name: pc2"/>
  28. </compile>
  29. </ajc-test>
  30. <ajc-test dir="bugs" pr="49457"
  31. title="No error on overloaded pointcuts unless binding variables">
  32. <compile files="OverloadedPointcutsInAspect.java">
  33. <message kind="error" line="15" text="duplicate pointcut name: pc"/>
  34. <message kind="error" line="16" text="duplicate pointcut name: pc"/>
  35. <message kind="error" line="18" text="incompatible type"/>
  36. <message kind="error" line="20" text="incompatible type"/>
  37. </compile>
  38. </ajc-test>
  39. <ajc-test dir="bugs" pr="48522"
  40. title="Declare soft softening other exception types">
  41. <compile files="SofteningTooMuch.java">
  42. <message kind="error" line="6" text="Unhandled exception"/>
  43. </compile>
  44. </ajc-test>
  45. <ajc-test dir="bugs" pr="47754"
  46. title="static method introduction on interfaces, should not be allowed">
  47. <compile files="StaticInterfaceMethods.java">
  48. <message kind="error" line="7" text="methods in interfaces cannot be declared static"/>
  49. </compile>
  50. </ajc-test>
  51. <ajc-test dir="bugs" pr="45184"
  52. title="External pointcut refs not resolved if named pointcut used by declare">
  53. <compile files="DeclareErrorNamedPointcutCE.java">
  54. <message kind="error" line="10" text="ref"/>
  55. </compile>
  56. </ajc-test>
  57. <ajc-test dir="bugs"
  58. title="Appropriate message for 'after() thowing(Throwable th)' syntax error"
  59. pr="49638"
  60. >
  61. <compile
  62. files="AfterThrowingAdviceSyntaxError.java" >
  63. <message kind="error" line="21" />
  64. <message kind="error" line="23" />
  65. </compile>
  66. </ajc-test>
  67. <ajc-test dir="bugs/faultingInSource" pr="46671"
  68. title="Ensure we don't look for source on the classpath when binary not found">
  69. <compile files="SimpleTracing.java" classpath="." options="-verbose">
  70. <message kind="warning" line="4" text="no match for this type name: SampleClass"/>
  71. </compile>
  72. </ajc-test>
  73. <ajc-test dir="bugs" pr="46750" title="inner aspect containing declare soft">
  74. <compile files="TestSoftening.java">
  75. </compile>
  76. </ajc-test>
  77. <ajc-test dir="bugs" pr="45663"
  78. title="Bad parser error recovery in advice">
  79. <compile files="ParserRecoveryTest.java">
  80. <message kind="error" line="7"/>
  81. </compile>
  82. </ajc-test>
  83. <ajc-test dir="bugs" pr="45663"
  84. title="Bad parser error recovery in java source">
  85. <compile files="ParserRecoveryTestPureJava.java">
  86. <message kind="error" line="6"/>
  87. <message kind="error" line="8"/>
  88. </compile>
  89. </ajc-test>
  90. <ajc-test dir="bugs"
  91. pr="46280"
  92. title="compiler issues error on inner aspects when privilieged">
  93. <compile files="PrivilegedParsing.java"/>
  94. <run class="PrivilegedParsing"/>
  95. </ajc-test>
  96. <ajc-test dir="bugs" pr="44586"
  97. title="After throwing advice on ctors doesn't execute for inter-type decl field inits">
  98. <compile files="AfterThrowingCtor.java">
  99. </compile>
  100. <run class="AfterThrowingCtor"/>
  101. </ajc-test>
  102. <ajc-test dir="bugs/abstractMethods" pr="49784"
  103. title="Introduced abstract method on abstract class not implemented by subtype (single source file)">
  104. <compile files="singlesource/C.java">
  105. <message kind="error" line="9"/>
  106. </compile>
  107. </ajc-test>
  108. <ajc-test dir="bugs/abstractMethods" pr="49784"
  109. title="Introduced abstract method on abstract class with introduced concrete method (single source file)">
  110. <compile files="singlesource/C1.java"/>
  111. <run class="C1"/>
  112. </ajc-test>
  113. <ajc-test dir="bugs/abstractMethods" pr="49784"
  114. title="Introduced abstract method on abstract class with existing concrete method (single source file)">
  115. <compile files="singlesource/C2.java"/>
  116. <run class="C2"/>
  117. </ajc-test>
  118. <ajc-test dir="bugs/interAbstract"
  119. pr="49784"
  120. title="aspect declares interface method (no modifiers)">
  121. <compile files="InterfaceMethodDeclarationNone.java" >
  122. <message kind="error" line="32" text="requires a body" />
  123. </compile>
  124. </ajc-test>
  125. <ajc-test dir="bugs/interAbstract"
  126. pr="49784"
  127. title="aspect declares interface method (abstract)">
  128. <compile files="InterfaceMethodDeclarationAbstract.java">
  129. <message kind="error" line="40" text="abstract intertype method declaration 'int I.getInt()' on interface I must be declared public (compiler limitation)" />
  130. </compile>
  131. </ajc-test>
  132. <ajc-test dir="bugs/interAbstract"
  133. pr="49784"
  134. comment="working in 1.1.1 - keep with others?"
  135. title="aspect declares interface method (public abstract)">
  136. <compile files="InterfaceMethodDeclarationFull.java" />
  137. <run class="InterfaceMethodDeclarationFull"/>
  138. </ajc-test>
  139. <ajc-test dir="bugs/interfaceDefinition"
  140. pr="43972"
  141. title="Use class implementing interface via aspect (not woven together)">
  142. <compile
  143. files="pack/DefineInterface.java,
  144. pack/InterfaceDefinition.java,
  145. pack/MyInterface.java"/>
  146. <run class="pack.InterfaceDefinition"/>
  147. <compile
  148. includeClassesDir="true"
  149. files="Main.java">
  150. <message kind="error" line="3"/>
  151. </compile>
  152. </ajc-test>
  153. <ajc-test dir="bugs/interfaceDefinition"
  154. pr="43972"
  155. title="Use class implementing interface via aspect (weave all together)">
  156. <compile
  157. files="pack/DefineInterface.java,
  158. pack/InterfaceDefinition.java,
  159. pack/MyInterface.java,
  160. Main.java"/>
  161. <run class="pack.InterfaceDefinition"/>
  162. <run class="Main"/>
  163. </ajc-test>
  164. <ajc-test dir="bugs/interfaceDefinition"
  165. pr="43972"
  166. title="Use class implementing interface via aspect (only one implementer)">
  167. <compile
  168. files="pack/DefineInterface.java,
  169. pack/InterfaceDefinition.java,
  170. pack/MyInterface.java"/>
  171. <run class="pack.InterfaceDefinition"/>
  172. <compile
  173. includeClassesDir="true"
  174. files="Main1.java"/>
  175. <run class="Main1"/>
  176. </ajc-test>
  177. <ajc-test dir="bugs" pr="44587"
  178. title="Erroneous exception conversion">
  179. <compile files="ErroneousExceptionConversion.java">
  180. </compile>
  181. <run class="ErroneousExceptionConversion"/>
  182. </ajc-test>
  183. <ajc-test dir="bugs" pr="34206"
  184. title="before():execution(new(..)) does not throw NoAspectBoundException">
  185. <compile files="ErroneousExceptionConversion1.java">
  186. </compile>
  187. <run class="ErroneousExceptionConversion1"/>
  188. </ajc-test>
  189. <ajc-test dir="bugs" pr="38824"
  190. title="Anomalous handling of inter-type declarations to abstract base classes in aspectj 1.1">
  191. <compile files="AbstractBaseAndInterTypeInterface.java">
  192. </compile>
  193. </ajc-test>
  194. <ajc-test dir="bugs/caseSensitivity" pr="42515"
  195. title="NPE When compiling intertype declaration">
  196. <compile files="uniqueId/Numbered.java,uniqueId/Bug.aj">
  197. <message kind="error" line="4"/>
  198. </compile>
  199. </ajc-test>
  200. <ajc-test dir="bugs"
  201. pr="49295"
  202. title="declare warning on subtype constructor">
  203. <compile files="SubtypeConstructorCW.java" >
  204. <message kind="warning" line="5" text="String as first"/>
  205. <message kind="warning" line="10" text="String as first"/>
  206. </compile>
  207. <run class="SubtypeConstructorCW"/>
  208. </ajc-test>
  209. <ajc-test dir="bugs" pr="50570"
  210. title="CatchClauseSignature has broken operation">
  211. <compile files="HandlerSig.java"/>
  212. <run class="HandlerSig"/>
  213. </ajc-test>
  214. <ajc-test dir="new" pr="42668"
  215. title="after returning with parameter: matching rules">
  216. <compile files="AfterReturningParamMatching.java" />
  217. <run class="AfterReturningParamMatching"/>
  218. </ajc-test>
  219. <ajc-test dir="bugs/binaryCompat" pr="50641"
  220. title="binary compatibility of advice method names - expect no error">
  221. <compile files="Main.java,TraceV1.aj"/>
  222. <run class="Main"/>
  223. <compile files="TraceV2.aj"/>
  224. <run class="Main"/>
  225. </ajc-test>
  226. <ajc-test dir="bugs/binaryCompat" pr="50641"
  227. title="binary compatibility of advice method names - expect error">
  228. <compile files="Main.java,TraceV1.aj"/>
  229. <run class="Main"/>
  230. <compile files="TraceRE.aj"/>
  231. <run class="Main"/>
  232. </ajc-test>
  233. <ajc-test dir="bugs/binaryCompat" pr="50641"
  234. title="binary compatibility of advice method names - expect no error">
  235. <compile files="Main.java,TraceWithInnerV1.aj"/>
  236. <run class="Main"/>
  237. <compile files="TraceWithInnerV2.aj"/>
  238. <run class="Main"/>
  239. </ajc-test>
  240. <ajc-test dir="bugs/protectedvf"
  241. title="mail list VerifyError with protected access">
  242. <compile files="main/Driver.java,main/p2/AbstractTest.aj,main/p1/ConcreteTest.aj"/>
  243. <run class="main.Driver"/>
  244. </ajc-test>
  245. <ajc-test dir="bugs" pr="51919"
  246. title="Polymorphic ITD fails in CVS HEAD (From ajdt 1.1.6)">
  247. <compile files="OverloadedITDNPE.java" />
  248. </ajc-test>
  249. <ajc-test dir="bugs" pr="51320"
  250. title="ClasscastException on concretization of if(false)">
  251. <compile files="DecwClassCastException.java">
  252. <!-- These are the illegal PCDs against a deow -->
  253. <message kind="error" line="27" text="if() pointcut designator cannot be used"/>
  254. <message kind="error" line="29" text="if() pointcut designator cannot be used"/>
  255. <message kind="error" line="31" text="cflow() pointcut designator cannot be used"/>
  256. <message kind="error" line="33" text="cflow() pointcut designator cannot be used"/>
  257. <message kind="error" line="35" text="cflowbelow() pointcut designator cannot be used"/>
  258. <message kind="error" line="37" text="cflowbelow() pointcut designator cannot be used"/>
  259. <message kind="error" line="39" text="this() pointcut designator cannot be used"/>
  260. <message kind="error" line="41" text="this() pointcut designator cannot be used"/>
  261. <message kind="error" line="43" text="target() pointcut designator cannot be used"/>
  262. <message kind="error" line="45" text="target() pointcut designator cannot be used"/>
  263. <message kind="error" line="47" text="args() pointcut designator cannot be used"/>
  264. <message kind="error" line="49" text="args() pointcut designator cannot be used"/>
  265. </compile>
  266. </ajc-test>
  267. <ajc-test dir="bugs" pr="51320"
  268. title="ClasscastException on concretization of if(false)">
  269. <compile files="DeclareSoftDynamicPCDs.java">
  270. <!-- These are the illegal PCDs against a deow -->
  271. <message kind="error" line="27" text="if() pointcut designator cannot be used"/>
  272. <message kind="error" line="29" text="if() pointcut designator cannot be used"/>
  273. <message kind="error" line="31" text="cflow() pointcut designator cannot be used"/>
  274. <message kind="error" line="33" text="cflow() pointcut designator cannot be used"/>
  275. <message kind="error" line="35" text="cflowbelow() pointcut designator cannot be used"/>
  276. <message kind="error" line="37" text="cflowbelow() pointcut designator cannot be used"/>
  277. <message kind="error" line="39" text="this() pointcut designator cannot be used"/>
  278. <message kind="error" line="41" text="this() pointcut designator cannot be used"/>
  279. <message kind="error" line="43" text="target() pointcut designator cannot be used"/>
  280. <message kind="error" line="45" text="target() pointcut designator cannot be used"/>
  281. <message kind="error" line="47" text="args() pointcut designator cannot be used"/>
  282. <message kind="error" line="49" text="args() pointcut designator cannot be used"/>
  283. </compile>
  284. </ajc-test>
  285. <ajc-test dir="bugs/abstractMethods" pr="49784"
  286. title="Introduced abstract method on interface not implemented by subtype (weave altogether)">
  287. <compile files="interface/C.java,interface/A.java,interface/B.java" />
  288. <run class="C"/>
  289. </ajc-test>
  290. <ajc-test dir="bugs/fieldsOnInterfaces"
  291. pr="52107"
  292. title="declare String field on interface">
  293. <compile files="StringFieldOnInterface.java">
  294. <message kind="warning" line="16" text="this affected type is not exposed"/>
  295. <message kind="warning" line="17" text="this affected type is not exposed"/>
  296. </compile>
  297. </ajc-test>
  298. <ajc-test dir="bugs/fieldsOnInterfaces"
  299. pr="52107"
  300. title="declare int field on interface">
  301. <compile files="IntFieldOnInterface.java">
  302. <message kind="warning" line="27" text="this affected type is not exposed"/>
  303. <message kind="warning" line="28" text="this affected type is not exposed"/>
  304. </compile>
  305. </ajc-test>
  306. <ajc-test dir="bugs/fieldsOnInterfaces"
  307. pr="52107"
  308. title="declare Object field on interface">
  309. <compile files="ObjectFieldOnInterface.java">
  310. <message kind="warning" line="20" text="this affected type is not exposed"/>
  311. <message kind="warning" line="21" text="this affected type is not exposed"/>
  312. </compile>
  313. </ajc-test>
  314. <ajc-test dir="bugs" pr="50776"
  315. title="fail in compiling aspect with overriding method introduction with different throws clause ">
  316. <compile files="IntertypeDifferentThrows.java" />
  317. </ajc-test>
  318. <ajc-test dir="new"
  319. comment="in ajc 1.1.1, VerifyError Illegal use of nonvirtual function call"
  320. title="super call in anonymous class created in around advice">
  321. <compile files="SuperClosure.java" />
  322. <run class="SuperClosure" />
  323. </ajc-test>
  324. <ajc-test dir="bugs" pr="44272"
  325. title="retitle warning to circular {advice} dependency at ...">
  326. <compile files="CircularAdvicePrecedence.java">
  327. <message kind="error" line="4"/>
  328. <message kind="error" line="5"/>
  329. <message kind="error" line="6"/>
  330. </compile>
  331. </ajc-test>
  332. <ajc-test dir="bugs" pr="51322"
  333. title="Introduce Unknown Type to class causes Null pointer exception" >
  334. <compile files="Pr51322.java">
  335. <message kind="error" line="5"/>
  336. </compile>
  337. </ajc-test>
  338. <ajc-test dir="bugs"
  339. title="Private members introduced via an interface are visible to the class"
  340. pr="52928">
  341. <compile
  342. files="VisiblePrivateInterfaceITDs.java" >
  343. <message kind="error" line="13"/>
  344. </compile>
  345. </ajc-test>
  346. <ajc-test dir="bugs/declarePrecedenceWithClasses" pr="53012"
  347. title="declare precedence on a class should be a compile-time error">
  348. <compile files="DeclarePrecedenceTestClass.java" >
  349. <message kind="error" line="10" text="Non-aspect types can only be specified"/>
  350. </compile>
  351. </ajc-test>
  352. <ajc-test dir="bugs/declarePrecedenceWithClasses" pr="53012"
  353. title="declare precedence on a class should be a compile-time error">
  354. <compile files="Priority.aj" />
  355. </ajc-test>
  356. <ajc-test dir="bugs"
  357. pr="59440"
  358. title="NPE when binary weaving a ctor ITD">
  359. <compile files="CtorITD.aj">
  360. <message kind="error" line="2"/>
  361. </compile>
  362. </ajc-test>
  363. <ajc-test dir="bugs"
  364. pr="59397"
  365. title="NPE in compiler when using (an unusual) declare warning against a ctor ITD">
  366. <compile files="DecwInitializationITD.java">
  367. <message kind="warning" line="16"/>
  368. </compile>
  369. </ajc-test>
  370. <ajc-test dir="bugs/compileOrdering"
  371. pr="59778"
  372. title="InterTypeMethodDeclaration.java:104">
  373. <compile files="B.java,D.java" >
  374. <message kind="error" line="2" file="B.java"/>
  375. </compile>
  376. <compile files="D.java,B.java">
  377. <message kind="error" line="2" file="B.java"/>
  378. </compile>
  379. </ajc-test>
  380. <ajc-test dir="bugs"
  381. pr="61538" title="nested uses of this() inside constructors not handled properly for initialization and preinitialization pointcuts">
  382. <compile files="ConstructorMain.java"/>
  383. <run class="ConstructorMain"/>
  384. </ajc-test>
  385. <ajc-test dir="bugs"
  386. pr="61568" title="wrong variable binding in || pointcuts">
  387. <compile files="DisjunctVarBinding.java">
  388. <message kind="error" line="17" text="ambiguous binding of parameter(s) a, b across '||' in pointcut"/>
  389. </compile>
  390. </ajc-test>
  391. <ajc-test dir="bugs"
  392. pr="60936" title="error message for constructor-execution pcd">
  393. <compile files="InterfaceConstructor.java">
  394. <message kind="warning" line="10" text="no interface constructor-execution join point"/>
  395. </compile>
  396. </ajc-test>
  397. <ajc-test dir="bugs" pr="43714"
  398. title="weaving using an empty jar in -injars" >
  399. <compile files="notAJar.jar" outjar="outJar.jar">
  400. <message kind="error" line="0"/>
  401. </compile>
  402. </ajc-test>
  403. <ajc-test dir="bugs" pr="43714"
  404. title="weaving using an empty jar in -aspectpath" >
  405. <compile files="WeaveLocal.java" aspectpath="notAJar.jar" outjar="outJar.jar" >
  406. </compile>
  407. </ajc-test>