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.

ajc189.xml 3.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <suite>
  3. <ajc-test dir="bugs189/486612" title="lost bounds">
  4. <compile files="Code.java Azpect.java" options="-1.8"/>
  5. </ajc-test>
  6. <ajc-test dir="bugs189/486203" title="while npe">
  7. <compile files="While.java" options="-1.8"/>
  8. </ajc-test>
  9. <ajc-test dir="bugs189/352389" title="overweaving">
  10. <compile files="A.java Code.java" outjar="one.jar" options="-1.8 -showWeaveInfo">
  11. <message kind="weave" text="Join point 'method-execution(void Code.m())' in Type 'Code' (Code.java:6) advised by before advice from 'A' (A.java:2)"/>
  12. </compile>
  13. <run class="Code" classpath="$sandbox/one.jar">
  14. <stdout>
  15. <line text="a"/>
  16. </stdout>
  17. </run>
  18. <!-- The non overweaving case would look like this -->
  19. <compile files="B.java" inpath="one.jar" options="-1.8 -showWeaveInfo" outjar="two.jar">
  20. <message kind="weave" text="Join point 'method-execution(void Code.m())' in Type 'Code' (Code.java:6) advised by before advice from 'B' (B.java:2)"/>
  21. <message kind="weave" text="Join point 'method-execution(void Code.m())' in Type 'Code' (Code.java:6) advised by before advice from 'A' (one.jar!A.class:2(from A.java))"/>
  22. </compile>
  23. <!-- With overweaving it looks like the advice from A isn't applying but it just isn't applying during this weave step, it
  24. remains in the bytecode applied from before. -->
  25. <compile files="B.java" inpath="one.jar" options="-1.8 -Xset:pipelineCompilation=false{overWeaving=true -showWeaveInfo" outjar="two.jar">
  26. <message kind="warning" text="advice defined in A has not been applied [Xlint:adviceDidNotMatch]"/>
  27. <message kind="weave" text="Join point 'method-execution(void Code.m())' in Type 'Code' (Code.java:6) advised by before advice from 'B' (B.java:2)"/>
  28. </compile>
  29. <!-- Note: with overweaving output is b>a without overweaving it is a>b -->
  30. <run class="Code" classpath="$sandbox/two.jar">
  31. <stdout>
  32. <line text="b"/>
  33. <line text="a"/>
  34. </stdout>
  35. </run>
  36. <compile files="C.java" inpath="two.jar" options="-1.8 -Xset:overWeaving=true -showWeaveInfo" outjar="three.jar">
  37. <message kind="warning" text="advice defined in A has not been applied [Xlint:adviceDidNotMatch]"/>
  38. <message kind="warning" text="advice defined in B has not been applied [Xlint:adviceDidNotMatch]"/>
  39. <message kind="weave" text="Join point 'method-execution(void Code.m())' in Type 'Code' (Code.java:6) advised by before advice from 'C' (C.java:2)"/>
  40. </compile>
  41. <!--
  42. <compile files="C.java" inpath="two.jar" options="-1.8 -showWeaveInfo" outjar="three.jar">
  43. <message kind="weave" text="Join point 'method-execution(void Code.m())' in Type 'Code' (Code.java:6) advised by before advice from 'C' (C.java:2)"/>
  44. <message kind="weave" text="Join point 'method-execution(void Code.m())' in Type 'Code' (Code.java:6) advised by before advice from 'B' (two.jar!B.class:2(from B.java))"/>
  45. <message kind="weave" text="Join point 'method-execution(void Code.m())' in Type 'Code' (Code.java:6) advised by before advice from 'A' (two.jar!A.class:2(from A.java))"/>
  46. </compile>
  47. -->
  48. <!-- Note: with overweaving c>b>a but without overweaving a>b>c -->
  49. <run class="Code" classpath="$sandbox/three.jar">
  50. <stdout>
  51. <line text="c"/>
  52. <line text="b"/>
  53. <line text="a"/>
  54. </stdout>
  55. </run>
  56. </ajc-test>
  57. </suite>