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.

ajc190.xml 8.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <suite>
  3. <ajc-test dir="bugs190/modules/aaa" title="build a module">
  4. <compile files="module-info.java com/foo1/C1.java" options="-1.9"/>
  5. </ajc-test>
  6. <ajc-test dir="bugs190/modules/bbb" title="run a module - classpath">
  7. <compile files="module-info.java aaa/bbb/A.java" options="-1.9"/>
  8. <run class="aaa.bbb.A">
  9. <stdout>
  10. <line text="A running"/>
  11. </stdout>
  12. </run>
  13. </ajc-test>
  14. <ajc-test dir="bugs190/modules/bbb" title="run a module - modulepath">
  15. <compile files="module-info.java aaa/bbb/A.java" options="-1.9"/>
  16. <run modulepath="$sandbox" module="my.module/aaa.bbb.A">
  17. <stdout>
  18. <line text="A running"/>
  19. </stdout>
  20. </run>
  21. </ajc-test>
  22. <ajc-test dir="bugs190/modules/bbb" title="package and run a module - modulepath">
  23. <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="my.module.jar"/>
  24. <file deletefile="module-info.java"/>
  25. <file deletefile="aaa"/>
  26. <run modulepath="my.module.jar" module="my.module/aaa.bbb.A">
  27. <stdout>
  28. <line text="A running"/>
  29. </stdout>
  30. </run>
  31. </ajc-test>
  32. <ajc-test dir="bugs190/modules/ccc" title="compile regular code using module code">
  33. <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="modules/my.module.jar"/>
  34. <file deletefile="module-info.java"/>
  35. <file deletefile="aaa"/>
  36. <compile files="InvokeA.java" options="-1.9" modulepath="$sandbox/modules/my.module.jar"/>
  37. </ajc-test>
  38. <ajc-test dir="bugs190/modules/ddd" title="compile regular code using module code that isn't visible">
  39. <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="modules/my.module.jar"/>
  40. <compile files="InvokeA.java" options="-1.9" modulepath="$sandbox/modules/my.module.jar">
  41. <message kind="error" text="package aaa.bbb is not visible"/>
  42. </compile>
  43. </ajc-test>
  44. <ajc-test dir="bugs190/modules/eee" title="binary weaving module">
  45. <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="my.module.jar"/>
  46. <file deletefile="module-info.java"/>
  47. <file deletefile="aaa"/>
  48. <compile files="Azpect.java" inpath="my.module.jar" outjar="my.module.woven.jar"/>
  49. <run modulepath="my.module.woven.jar" module="my.module/aaa.bbb.A">
  50. <stdout>
  51. <line text="Azpect running"/>
  52. <line text="A running"/>
  53. </stdout>
  54. </run>
  55. </ajc-test>
  56. <ajc-test dir="bugs190/520135" title="funny signature with method reference">
  57. <compile files="FailsApectJ.java" options="-1.8"/>
  58. </ajc-test>
  59. <ajc-test dir="bugs190/modules/fff" title="compile module including aspects">
  60. <compile files="module-info.java pkg/Demo.java otherpkg/Azpect.java" modulepath="$runtime" outjar="demomodule.jar" options="-1.9"/>
  61. <run modulepath="$runtime:demomodule.jar" module="demo/pkg.Demo">
  62. <stdout>
  63. <line text="Azpect running"/>
  64. <line text="Demo running"/>
  65. </stdout>
  66. </run>
  67. </ajc-test>
  68. <ajc-test dir="bugs190/modules/eee" title="compile module and apply aspects via aspectpath">
  69. <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="my.module.jar"/>
  70. <file deletefile="module-info.java"/>
  71. <file deletefile="aaa"/>
  72. <compile files="Azpect.java" outjar="azpects.jar"/>
  73. <compile options="-showWeaveInfo" inpath="my.module.jar" aspectpath="azpects.jar" outjar="my.module.woven.jar">
  74. <message kind="weave" text="Join point 'method-execution(void aaa.bbb.A.main(java.lang.String[]))' in Type 'aaa.bbb.A' (A.java:4) advised by before advice from 'aspects.Azpect' (azpects.jar!Azpect.class:4(from Azpect.java))"/>
  75. </compile>
  76. <file deletefile="my.module.jar"/>
  77. <run classpath="my.module.woven.jar:azpects.jar" class="aaa.bbb.A">
  78. <stdout>
  79. <line text="Azpect running"/>
  80. <line text="A running"/>
  81. </stdout>
  82. </run>
  83. </ajc-test>
  84. <ajc-test dir="bugs190/modules/ggg" title="module path vs classpath 1">
  85. <!-- build some simple code into a jar we can depend on *not a module* -->
  86. <compile files="ddd/D.java" options="-1.9" outjar="foo.jar"/>
  87. <file deletefile="ddd/D.java"/>
  88. <!-- compile a module that depends on that -->
  89. <!-- this fails because if you start working with modules you commit to the modules story and classpath
  90. becomes irrelevant -->
  91. <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="module.jar" classpath="foo.jar">
  92. <message kind="error" text="The import ddd cannot be resolved"/>
  93. <message kind="error" text="D cannot be resolved"/>
  94. </compile>
  95. </ajc-test>
  96. <ajc-test dir="bugs190/modules/hhh" title="module path vs classpath 2">
  97. <!-- build some simple code into a jar we can depend on *not a module* -->
  98. <file renamefrom="module-info-a.java" renameto="module-info.java"/>
  99. <compile files="module-info.java ddd/D.java" options="-1.9" outjar="my.module.a.jar"/>
  100. <!--
  101. <file renamefrom="module-info-b.java" renameto="module-info.java"/>
  102. <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="my.module.b.jar" modulepath="my.module.a.jar"/>
  103. -->
  104. </ajc-test>
  105. <ajc-test dir="bugs190/modules/iii" title="compile use of java.xml.bind">
  106. <compile files="UsesJAXB.java" options="--add-modules java.xml.bind -1.9"/>
  107. <run class="UsesJAXB" vmargs="--add-modules java.xml.bind">
  108. <stdout>
  109. <line text="UsesJAXB.running..."/>
  110. </stdout>
  111. </run>
  112. </ajc-test>
  113. <ajc-test dir="bugs190/modules/iii" title="weave use of java.xml.bind">
  114. <compile files="UsesJAXB.java Azpect.java" options="--add-modules java.xml.bind -1.9"/>
  115. <run class="UsesJAXB" vmargs="--add-modules java.xml.bind">
  116. <stdout>
  117. <line text="UsesJAXB.running..."/>
  118. <line text="null"/>
  119. </stdout>
  120. </run>
  121. </ajc-test>
  122. <ajc-test dir="bugs190/modules/iii" title="limit modules 1">
  123. <compile files="UsesJAXB.java Azpect.java" options="--limit-modules java.xml.bind -1.9"/>
  124. <run class="UsesJAXB" vmargs="--limit-modules java.xml.bind">
  125. <stdout>
  126. <line text="UsesJAXB.running..."/>
  127. <line text="null"/>
  128. </stdout>
  129. </run>
  130. </ajc-test>
  131. <ajc-test dir="bugs190/modules/iii" title="add reads 1">
  132. <compile files="UsesJAXB.java Azpect.java" options="--add-reads java.sql=java.xml.bind --add-modules java.sql -1.9"/>
  133. <run class="UsesJAXB" vmargs="--add-modules java.xml.bind ">
  134. <stdout>
  135. <line text="UsesJAXB.running..."/>
  136. <line text="null"/>
  137. </stdout>
  138. </run>
  139. </ajc-test>
  140. <!--
  141. <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="module.jar" aspectpath="foo.jar"/>
  142. <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="my.module.jar"/>
  143. <file deletefile="module-info.java"/>
  144. <file deletefile="aaa"/>
  145. <compile files="Azpect.java" outjar="azpects.jar"/>
  146. <compile options="-showWeaveInfo" inpath="my.module.jar" aspectpath="azpects.jar" outjar="my.module.woven.jar">
  147. <message kind="weave" text="Join point 'method-execution(void aaa.bbb.A.main(java.lang.String[]))' in Type 'aaa.bbb.A' (A.java:4) advised by before advice from 'aspects.Azpect' (azpects.jar!Azpect.class:4(from Azpect.java))"/>
  148. </compile>
  149. <file deletefile="my.module.jar"/>
  150. <run classpath="my.module.woven.jar:azpects.jar" class="aaa.bbb.A">
  151. <stdout>
  152. <line text="Azpect running"/>
  153. <line text="A running"/>
  154. </stdout>
  155. </run>
  156. </ajc-test>
  157. -->
  158. <ajc-test dir="bugs190/modules" title="weave module">
  159. <compile files="aspect1/Azpect1.java" inpath="module1/module-one.jar" outjar="runner.jar" options="-1.8"/>
  160. <java classpath="runner.jar" class="a.b.c.Code"/>
  161. </ajc-test>
  162. <ajc-test dir="bugs190/various" title="setting static final outside clinit">
  163. <compile files="Code.java" options="-1.9"/>
  164. <run class="Code">
  165. <stdout>
  166. <line text="call(void java.io.PrintStream.println(String))"/>
  167. <line text="running"/>
  168. </stdout>
  169. </run>
  170. </ajc-test>
  171. <!-- from ajc153 -->
  172. <ajc-test dir="bugs153/pr156962" title="Test Annot Method Has Member 1">
  173. <compile files="Sample.java, LiftDeprecation.aj" options="-1.9 -XhasMember -showWeaveInfo -Xlint:ignore">
  174. <message kind="weave" text="'Sample' (Sample.java:1) is annotated with @Deprecated type annotation from 'LiftDeprecation' (LiftDeprecation.aj:2)"/>
  175. </compile>
  176. </ajc-test>
  177. <!-- from ajc153 -->
  178. <ajc-test dir="bugs153/pr156962" title="Test Annot Method Has Member 2">
  179. <compile files="Sample.java, LiftDeprecation.aj" options="-1.8 -XhasMember -showWeaveInfo -Xlint:ignore">
  180. <message kind="weave" text="'Sample' (Sample.java:1) is annotated with @Deprecated type annotation from 'LiftDeprecation' (LiftDeprecation.aj:2)"/>
  181. </compile>
  182. </ajc-test>
  183. </suite>