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.

knownLimitations-tests.xml 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <!-- Known Limitations -->
  2. <!-- we're not implementing static inter-type fields on interfaces in 1.1 -->
  3. <ajc-test dir="knownLimitations/test117" title="DEPRECATED: introduce of variables"
  4. keywords="from-base,knownLimitation">
  5. <compile files="Driver.java"/>
  6. <run class="Driver"/>
  7. </ajc-test>
  8. <!-- we're not implementing this error check in 1.1 -->
  9. <ajc-test dir="errors"
  10. title="checking the contra-variant errors for typing of proceed"
  11. keywords="from-errors,knownLimitation">
  12. <compile files="BadAround.java">
  13. <message kind="error" line="12"/>
  14. <message kind="error" line="15"/>
  15. <message kind="error" line="18"/>
  16. <message kind="error" line="19"/>
  17. <message kind="error" line="22"/>
  18. </compile>
  19. </ajc-test>
  20. <!-- we're not implementing static inter-type fields on interfaces in 1.1 -->
  21. <ajc-test dir="design/intro"
  22. title="introduction of static methods and fields on classes and interfaces"
  23. keywords="from-design,knownLimitation">
  24. <compile files="Statics.java"/>
  25. <run class="Statics"/>
  26. </ajc-test>
  27. <!-- only before advice implemented for handler join points in 1.1 -->
  28. <ajc-test dir="new" title="advice on catch clauses"
  29. keywords="from-resolved_10x,knownLimitation">
  30. <compile files="CatchAdvice.java"/>
  31. <run class="CatchAdvice"/>
  32. </ajc-test>
  33. <!-- we will handle this by signalling a weave-time error for any around
  34. advice that is applied to a join point which throws checked exceptions
  35. that it can't handle. proceeds in closures change the exceptions that
  36. around advice can handle to include the greatest lower bound of the
  37. checked exceptions that are legally throwable by the proceed.
  38. Ideally their should be an -Xlint compile-time warning for ALL
  39. cases that could produce weave-time errors.
  40. -->
  41. <ajc-test dir="new" title="holding onto proceed calls in a closure-like way"
  42. keywords="from-resolved_10x,knownLimitation">
  43. <compile files="HoldProceed.java"/>
  44. <run class="HoldProceed"/>
  45. </ajc-test>
  46. <!-- around advice not implemented on initializer join points -->
  47. <ajc-test dir="new" pr="490"
  48. title="PR#458 Compiler was incorrectly flagging error in advice on initialization and static initialization"
  49. keywords="from-resolved_10x,knownLimitation">
  50. <compile files="StaticInitCE.java"/>
  51. <run class="StaticInitCE"/>
  52. </ajc-test>
  53. <!-- This behavior is different from 1.0, but we might want to consider allowing it
  54. Using the eclipse compiler it would be much easier to permit than forbid. -->
  55. <ajc-test dir="new/introTypeMissing"
  56. title="Introduced type unavailable to instanceof expressions in introduced methods"
  57. keywords="from-resolved_10x,knownLimitation">
  58. <compile files="InstanceOf.java,TargetClass.java,Util.java">
  59. <message kind="error" line="19"/>
  60. <message kind="error" line="20"/>
  61. <message kind="error" line="21"/>
  62. <message kind="error" line="22"/>
  63. <message kind="error" line="23"/>
  64. <message kind="error" line="24"/>
  65. <message kind="error" line="25"/>
  66. <message kind="error" line="26"/>
  67. </compile>
  68. </ajc-test>
  69. <ajc-test dir="new"
  70. title="enclosing join point not exported properly in pre-initialization join point"
  71. keywords="from-resolved_10x,knownLimitation">
  72. <compile files="PreInitialization.java"/>
  73. <run class="PreInitialization"/>
  74. </ajc-test>
  75. <!-- pointcuts aren't checked for circularities unless they're used -->
  76. <ajc-test dir="new" pr="568" title="cyclic pointcut definitions"
  77. keywords="from-resolved_10rc3,knownLimitation">
  78. <compile files="CyclicPointcuts.java">
  79. <message kind="error" line="11"/>
  80. <message kind="error" line="14"/>
  81. <message kind="error" line="18"/>
  82. <message kind="error" line="32"/>
  83. <message kind="error" line="43"/>
  84. </compile>
  85. </ajc-test>
  86. <ajc-test dir="new"
  87. title="package typepattern with no packages (in default package)"
  88. keywords="from-resolved_105,knownLimitation">
  89. <compile options="-Xlint" files="TypeNames.java">
  90. <message kind="warning" line="34"/>
  91. <message kind="warning" line="39"/>
  92. <message kind="warning" line="43"/>
  93. <message kind="warning" line="47"/>
  94. </compile>
  95. <run class="TypeNames"/>
  96. </ajc-test>
  97. <ajc-test dir="new" pr="764"
  98. title="flag errors when binding args with indeterminate prefix and suffix"
  99. keywords="from-resolved_105,knownLimitation">
  100. <compile files="IndeterminateArgsCE.java">
  101. <message kind="error" line="67"/>
  102. <message kind="error" line="68"/>
  103. <message kind="error" line="70"/>
  104. <message kind="error" line="72"/>
  105. </compile>
  106. </ajc-test>
  107. <ajc-test dir="design/around"
  108. title="around and return types + inlining optimizations"
  109. comment="-XOcodeSize not in 1.1, source uses 1.4 APIs"
  110. keywords="from-14tests,knownLimitation">
  111. <compile options="-XOcodeSize,-source,1.4"
  112. files="ReturnCastProceed.java,StackChecker.java">
  113. <message kind="warning" line="68"/>
  114. </compile>
  115. <run class="ReturnCastProceed" vm="1.4"/>
  116. </ajc-test>
  117. <ajc-test dir="new" pr="885" keywords="knownLimitation"
  118. comment="this behaves differently in 1.3 from 1.4 for unknown reasons, merge with above when resolved"
  119. title="source locations within expressions (hard case of constructor start)">
  120. <compile files="SourceLocationWithinExprHard.java"/>
  121. <run class="SourceLocationWithinExprHard"/>
  122. </ajc-test>
  123. <!-- Can't handle packages named 'aspect' in parser
  124. -->
  125. <ajc-test dir="new/PR852" pr="852"
  126. title="declaring method on superclass and subclass"
  127. keywords="knownLimitation">
  128. <compile files="aspect/Aspect.java,target/SubClass.java,target/SuperClass.java">
  129. <dir-changes added="target.SubClass,target.SuperClass"/>
  130. </compile>
  131. <run class="aspect.Aspect"/>
  132. </ajc-test>
  133. <ajc-test dir="new" pr="660" title="illegal name binding in around cflow"
  134. keywords="from-resolved_104,knownLimitation">
  135. <compile files="ArgsInCflowCf.java">
  136. <message kind="error" line="19"/>
  137. <message kind="error" line="29"/>
  138. <message kind="error" line="35"/>
  139. </compile>
  140. </ajc-test>
  141. <ajc-test dir="incremental/stringliteral"
  142. keywords="knownLimitation"
  143. title="incrementally change string size and wire in injar classes">
  144. <compile staging="true" options="-incremental"
  145. files="oneInjar.jar,twoInjar.jar"
  146. sourceroots="src"/>
  147. <run class="packageOne.Main"
  148. options="in packageOne.Main.main(..),
  149. before main packageOne.Main"/>
  150. <inc-compile tag="20">
  151. <dir-changes updated="packageOne.Main"/>
  152. </inc-compile>
  153. <!-- now failing here. This step passes in non-injar variant. -->
  154. <run class="packageOne.Main"
  155. options="in longer packageOne.Main.main(..),
  156. before main packageOne.Main"/>
  157. <inc-compile tag="30">
  158. <dir-changes added="RunInjarMains"/>
  159. </inc-compile>
  160. <run class="packageOne.Main"
  161. options="in longer packageOne.Main.main(..),
  162. before main InjarOneMain,
  163. before main InjarTwoMain,
  164. before main packageOne.Main"/>
  165. </ajc-test>
  166. <ajc-test dir="bugs" pr="34206"
  167. keywords="knownLimitation"
  168. title="before():execution(new(..)) does not throw NoAspectBoundException"
  169. comment="correct behavior of this case needs to be thought through">
  170. <compile files="AspectInitError.java"/>
  171. <run class="AspectInitError"/>
  172. </ajc-test>
  173. <ajc-test dir="new/binaryWarnings/src" pr="37020"
  174. keywords="knownLimitation"
  175. comment="source loc of binary jp depends on first code, not block start"
  176. title="declare error on handler/method execution with no code on binary ajc 1.1 classes">
  177. <compile files="aspects/MainExecStartLinesErrors.java,../injars/appStartLines-ajc-1.1.jar">
  178. <message kind="error" file="app/MainExecStartLines.java"
  179. line="6" text="execution(void MainExecStartLines.main(String[]))"/>
  180. <message kind="error" file="app/MainExecStartLines.java"
  181. line="17" text="handler(RuntimeException)"/>
  182. </compile>
  183. </ajc-test>
  184. <ajc-test dir="new/binaryWarnings/src" pr="37020"
  185. keywords="knownLimitation"
  186. comment="source loc of binary jp depends on first code, not block start; XXX need javac inlining example"
  187. title="declare error on handler/method execution with no code on binary javac 1.4 classes">
  188. <compile files="aspects/MainExecStartLinesErrors.java,../injars/appStartLines-javac-1.4.jar">
  189. <message kind="error" file="app/MainExecStartLines.java"
  190. line="6" text="execution(void MainExecStartLines.main(String[]))"/>
  191. <message kind="error" file="app/MainExecStartLines.java"
  192. line="17" text="handler(RuntimeException)"/>
  193. </compile>
  194. </ajc-test>
  195. <ajc-test dir="harness"
  196. keywords="command-line-error,knownLimitation"
  197. comment="can't test -help: has to abort, but returns 0, normal status"
  198. title="CLE: -help usage">
  199. <compile badInput="true" options="-help">
  200. <message kind="abort" text="Usage"/>
  201. </compile>
  202. </ajc-test>
  203. <!-- The next three tests are all about the same issue. The source
  204. line for a constructor execution is returned as the first executable
  205. line within the constructor-execution join point rather than the declaration
  206. line of the constructor. Any other definition will require collusion between
  207. the source->bytecode compiler and the weaver and will only work in
  208. those case where such collusion is possible.
  209. -->
  210. <ajc-test dir="new/binaryWarnings/src" pr="37020" keywords="knownLimitation"
  211. title="declare warnings on main - constructor execution">
  212. <compile files="aspects/ConstructorExecutionWarning.java,app/Main.java">
  213. <message kind="warning" file="app/Main.java"
  214. line="23" text="execution(Main.new())"/>
  215. </compile>
  216. <run class="app.Main"/>
  217. </ajc-test>
  218. <ajc-test dir="new/binaryWarnings/src" pr="37020" keywords="knownLimitation"
  219. title="declare warnings on binary javac 1.4 main - constructor execution">
  220. <compile files="aspects/ConstructorExecutionWarning.java,../injars/app-javac-1.4.jar">
  221. <message kind="warning" file="app/Main.java"
  222. line="23" text="execution(Main.new())"/>
  223. </compile>
  224. <run class="app.Main"/>
  225. </ajc-test>
  226. <ajc-test dir="new/binaryWarnings/src" pr="37020" keywords="knownLimitation"
  227. title="declare warnings on binary ajc 1.1 main - constructor execution">
  228. <compile files="aspects/ConstructorExecutionWarning.java,../injars/app-ajc-1.1.jar">
  229. <message kind="warning" file="app/Main.java"
  230. line="23" text="execution(Main.new())"/>
  231. </compile>
  232. <run class="app.Main"/>
  233. </ajc-test>
  234. <ajc-test dir="bugs/handlers" pr="37898" keywords="knownLimitation"
  235. title="advice on handler join points should not throw unpermitted checked exceptions">
  236. <compile files="ExceptionCheckCE.java">
  237. <message kind="warning" line="8" text="expected"/>
  238. <message kind="error" line="25" text="throw checked exception" />
  239. <message kind="error" line="8" text="throw checked exception" />
  240. </compile>
  241. </ajc-test>
  242. <ajc-test dir="harness" pr="38134" keywords="knownLimitation"
  243. comment="behavior is correct for 1.1 - revisit for 1.2"
  244. title="-nowarn suppresses XLint warnings">
  245. <compile files="XLintWarningTest.java" options="-nowarn"/>
  246. </ajc-test>
  247. <ajc-test dir="harness" pr="38134" keywords="knownLimitation"
  248. comment="behavior is correct for 1.1 - revisit for 1.2"
  249. title="warn:none suppresses XLint warnings">
  250. <compile files="XLintWarningTest.java" options="-warn:none"/>
  251. </ajc-test>
  252. <ajc-test dir="harness" pr="38134" keywords="knownLimitation"
  253. comment="behavior is correct for 1.1 - revisit for 1.2"
  254. title="-nowarn suppresses declare warnings">
  255. <compile files="WarningTest.java" options="-nowarn"/>
  256. </ajc-test>
  257. <ajc-test dir="harness" pr="38134" keywords="knownLimitation"
  258. comment="behavior is correct for 1.1 - revisit for 1.2"
  259. title="-warn:none suppresses declare warnings">
  260. <compile files="WarningTest.java" options="-warn:none"/>
  261. </ajc-test>
  262. <ajc-test dir="bugs" pr="38168" keywords="knownLimitation"
  263. title="insertion of lots of advice code can make branch offset for if too large">
  264. <compile files="WideJumps.java"/>
  265. <run class="WideJumps"/>
  266. </ajc-test>