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.4KB

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