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.

ajc183.xml 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <suite>
  3. <ajc-test dir="bugs183/443355" title="super calls">
  4. <compile options="-1.8" files="Demo.java"/>
  5. <run class="Demo">
  6. <stdout>
  7. <line text="HW"/>
  8. </stdout>
  9. </run>
  10. </ajc-test>
  11. <ajc-test dir="bugs183/436653/abstract" title="suppress type not found - abstract 2">
  12. <compile options="-1.8 -Xlint:ignore" files="A.java" outjar="codeA.jar"/>
  13. <compile options="-1.8" files="X.java AA.java" classpath="codeA.jar" outjar="aspects.jar"/>
  14. <compile options="-1.8" files="Code.java" aspectpath="aspects.jar"/>
  15. <run class="Code">
  16. <stdout>
  17. <!--
  18. These don't come out because AA is missing required type A in the last compile step
  19. <line text="X.before"/>
  20. <line text="X.before"/>
  21. -->
  22. <line text="Code.m()"/>
  23. </stdout>
  24. </run>
  25. </ajc-test>
  26. <ajc-test dir="bugs183/436653/abstract" title="suppress type not found - abstract 1">
  27. <compile options="-1.8 -Xlint:ignore" files="A.java" outjar="codeA.jar"/>
  28. <compile options="-1.8" files="AA.java X.java" classpath="codeA.jar" outjar="aspects.jar"/>
  29. <compile options="-1.8" files="Code.java" aspectpath="aspects.jar"/>
  30. <run class="Code">
  31. <stdout>
  32. <!--
  33. These don't come out because AA is missing required type A in the last compile step.
  34. Difference between this test and the previous one is that this is a different order
  35. of aspects (addOrReplaceAspects called with the abstract aspect first here).
  36. <line text="X.before"/>
  37. <line text="X.before"/>
  38. -->
  39. <line text="Code.m()"/>
  40. </stdout>
  41. </run>
  42. </ajc-test>
  43. <ajc-test dir="bugs183/436653" title="suppress type not found 4">
  44. <compile options="-1.8 -Xlint:ignore" files="X.java" outjar="aspects.jar"/>
  45. <compile options="-1.8" files="Runner.java"/>
  46. <run class="Runner" ltw="aop.xml">
  47. <stdout>
  48. <line text="Code.m() running"/>
  49. </stdout>
  50. </run>
  51. </ajc-test>
  52. <ajc-test dir="bugs183/436653" title="suppress type not found 5">
  53. <compile options="-1.8 -Xlint:ignore" files="X.java" outjar="aspects.jar"/>
  54. <compile options="-1.8" files="A.java"/>
  55. <compile options="-1.8" files="Runner.java"/>
  56. <run class="Runner" ltw="aop.xml">
  57. <stdout>
  58. <line text="x"/>
  59. <line text="Code.m() running"/>
  60. </stdout>
  61. </run>
  62. </ajc-test>
  63. <!-- annotation style aspect, missing type so deactivated -->
  64. <ajc-test dir="bugs183/436653" title="suppress type not found 6">
  65. <compile options="-1.8 -Xlint:ignore" files="AnnoX.java" outjar="aspects.jar"/>
  66. <compile options="-1.8" files="Runner.java"/>
  67. <run class="Runner" ltw="aop2.xml">
  68. <stdout>
  69. <line text="Code.m() running"/>
  70. </stdout>
  71. </run>
  72. </ajc-test>
  73. <!-- annotation style aspect, type not missing so not deactivated -->
  74. <ajc-test dir="bugs183/436653" title="suppress type not found 7">
  75. <compile options="-1.8 -Xlint:ignore" files="AnnoX.java A.java" outjar="aspects.jar"/>
  76. <compile options="-1.8" files="Runner.java"/>
  77. <run class="Runner" ltw="aop2.xml">
  78. <stdout>
  79. <line text="x"/>
  80. <line text="Code.m() running"/>
  81. </stdout>
  82. </run>
  83. </ajc-test>
  84. <!-- annotation style aspect, type not missing so not deactivated -->
  85. <ajc-test dir="bugs183/436653" title="suppress type not found 8">
  86. <compile options="-1.8 -Xlint:ignore" files="AnnoX.java A.java" outjar="aspects.jar"/>
  87. <compile options="-1.8 -showWeaveInfo" files="Runner.java" aspectpath="aspects.jar">
  88. <message kind="weave" text="Join point 'method-execution(void Code.m())' in Type 'Code' (Runner.java:8) advised by before advice from 'X' (aspects.jar!AnnoX.class(from AnnoX.java))"/>
  89. </compile>
  90. <run class="Runner">
  91. <stdout>
  92. <line text="x"/>
  93. <line text="Code.m() running"/>
  94. </stdout>
  95. </run>
  96. </ajc-test>
  97. <ajc-test dir="bugs183/436653" title="suppress type not found 3">
  98. <compile options="-1.8" files="A.java" outjar="typeA.jar"/>
  99. <compile options="-1.8" files="B.java" outjar="typeB.jar"/>
  100. <!-- adviceDidNotMatch messages are suppressed here -->
  101. <compile options="-1.8" files="XA3.java XCode.java" outjar="aspects.jar" classpath="typeA.jar"/>
  102. <compile options="-1.8 -verbose" files="Code.java" classpath="typeA.jar" aspectpath="aspects.jar">
  103. <!-- '*' is a hint that we care about only this message, not other messages. avoids needing to list them all -->
  104. <message kind="info" text="*deactivating aspect 'XA2' as it requires type 'B' which cannot be found on the classpath"/>
  105. </compile>
  106. </ajc-test>
  107. <ajc-test dir="bugs183/436653" title="suppress type not found 2">
  108. <compile options="-1.8" files="A.java" outjar="typeA.jar"/>
  109. <!-- adviceDidNotMatch messages are suppressed here -->
  110. <compile options="-1.8" files="XA2.java XCode.java" outjar="aspects.jar" classpath="typeA.jar"/>
  111. <compile options="-1.8" files="Code.java" aspectpath="aspects.jar">
  112. </compile>
  113. </ajc-test>
  114. <ajc-test dir="bugs183/436653" title="suppress type not found">
  115. <compile options="-1.8" files="A.java" outjar="typeA.jar"/>
  116. <!-- adviceDidNotMatch messages are suppressed here -->
  117. <compile options="-1.8" files="XA.java XCode.java" outjar="aspects.jar" classpath="typeA.jar"/>
  118. <compile options="-1.8" files="Code.java" aspectpath="aspects.jar">
  119. <message kind="error" text="can't determine modifiers of missing type A"/>
  120. </compile>
  121. </ajc-test>
  122. <ajc-test dir="bugs183/445395" title="constant pool 0">
  123. <compile options="-1.8" files="Code.java">
  124. </compile>
  125. <run class="Code">
  126. <stdout>
  127. <line text="4"/>
  128. <line text="5"/>
  129. <line text="6"/>
  130. </stdout>
  131. </run>
  132. </ajc-test>
  133. <ajc-test dir="bugs183/445395" title="constant pool">
  134. <compile options="-1.8" files="ControlFlow.java ForReplacer.java ControlFlowCommand.java ControlFlowDriver.java">
  135. </compile>
  136. </ajc-test>
  137. <ajc-test dir="bugs183/444398" title="abstract aspect npe">
  138. <compile options="-1.8" files="Bottom.java Middle.java Top.java">
  139. </compile>
  140. </ajc-test>
  141. <ajc-test dir="bugs183/442425" title="anno style decp">
  142. <compile options="-1.8" files="EntityController.java IEntityController.java MyAnnotatedController.java EntityControllerAspect.java EntityMongoController.java">
  143. <!--
  144. NOTE: As explained in https://bugs.eclipse.org/bugs/show_bug.cgi?id=442425#c2, @DeclareParents will add the
  145. raw form of the parent to the target class, not the generic one. Therefore, without additional casts AJC would
  146. throw the following two errors:
  147. -->
  148. <!--<message kind="error" line="26" text="Type mismatch: cannot convert from MyAnnotatedController&lt;String&gt; to IEntityController&lt;String&gt;"/>-->
  149. <!--<message kind="error" line="38" text="Cannot infer type arguments for MyAnnotatedController&lt;&gt;"/>-->
  150. </compile>
  151. <run class="MyAnnotatedController">
  152. <stdout ordered="no">
  153. <line text="Doing something"/>
  154. <line text="public static void MyAnnotatedController.main(java.lang.String[])"/>
  155. <line text="public void MyAnnotatedController.doSomething()"/>
  156. <!-- Object, not generic type -->
  157. <line text="public java.lang.Object MyAnnotatedController.getEntity()"/>
  158. <!-- Object, not generic type -->
  159. <line text="public void MyAnnotatedController.setEntity(java.lang.Object)"/>
  160. <line text="Entity value = foo"/>
  161. <line text="Entity value = 123"/>
  162. </stdout>
  163. </run>
  164. </ajc-test>
  165. <ajc-test dir="bugs183/443477" title="verifyerror">
  166. <compile options="-1.7" files="Coo.java"/>
  167. <run class="Coo"/>
  168. </ajc-test>
  169. </suite>