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.

ajc198.xml 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <suite>
  3. <!-- https://github.com/eclipse/org.aspectj/issues/68 -->
  4. <ajc-test dir="bugs198/github_68" vm="11" title="correctly weave code using constant-dynamic">
  5. <compile files="Application.java MyAspect.aj" options="-11" inpath="condy.jar"/>
  6. <run class="Application">
  7. <stdout>
  8. <line text="execution(CondyCallable())" />
  9. <line text="execution(CondyCallable())" />
  10. <line text="execution(Application())" />
  11. <line text="Sample instance created" />
  12. </stdout>
  13. </run>
  14. </ajc-test>
  15. <!-- https://github.com/eclipse/org.aspectj/issues/105 -->
  16. <ajc-test dir="bugs198/github_105" vm="8" title="ITD annotation with mandatory parameter via aspectpath">
  17. <compile files="FooAnnotation.java BarAnnotation.java FooAspect.aj" options="-8" outjar="aspect.jar"/>
  18. <compile files="Application.java" options="-8" aspectpath="aspect.jar"/>
  19. </ajc-test>
  20. <!-- Java 17 final, Java 16, 15 preview -->
  21. <ajc-test dir="features197/java15" vm="17" title="sealed class with legal subclasses">
  22. <compile files="Person.java Employee.java Manager.java" options="-17" />
  23. </ajc-test>
  24. <!-- Java 17 final, Java 16, 15 preview -->
  25. <ajc-test dir="features197/java15" vm="17" title="sealed class with illegal subclass">
  26. <compile files="Person.java Employee.java Manager.java PersonaNonGrata.java" options="-17">
  27. <message kind="error" file="PersonaNonGrata.java" text="should be a permitted subtype of Person"/>
  28. </compile>
  29. </ajc-test>
  30. <!-- Java 17 final, Java 16, 15 preview -->
  31. <ajc-test dir="features197/java15" vm="17" title="weave sealed class">
  32. <compile files="Person.java Employee.java Manager.java TopManager.java PersonAspect.aj" options="-17" />
  33. <run class="TopManager">
  34. <stdout>
  35. <line text="Hello Sir John" />
  36. <line text="CEO" />
  37. </stdout>
  38. </run>
  39. </ajc-test>
  40. <!-- Java ?? final, Java 17 preview -->
  41. <ajc-test dir="features198/java17" vm="17" title="switch pattern matching error">
  42. <compile files="SwitchPatternError.java" options="--enable-preview -17">
  43. <!-- TODO: Add correct compiler error message, as soon as JDT Core supports it -->
  44. <message kind="error" file="SwitchPatternError.java" text="This case label is dominated by one of the preceding case label"/>
  45. </compile>
  46. </ajc-test>
  47. <!-- Java ?? final, Java 17 preview -->
  48. <ajc-test dir="features198/java17" vm="17" title="switch pattern matching java">
  49. <compile files="SwitchPatternOK.java" options="--enable-preview -17" />
  50. <run class="SwitchPatternOK" vmargs="--enable-preview">
  51. <stdout>
  52. <line text="null" />
  53. <line text="int 123" />
  54. <line text="long 999" />
  55. <line text="double 12.340000" />
  56. <line text="String foo" />
  57. <line text="[123, foo, 999, 12.34]" />
  58. <line text="Non-circle" />
  59. <line text="Small circle" />
  60. <line text="Large circle" />
  61. <line text="Sealed sub-class A" />
  62. <line text="Sealed sub-class B" />
  63. <line text="Sealed sub-record C" />
  64. </stdout>
  65. </run>
  66. </ajc-test>
  67. <!-- Java ?? final, Java 17 preview -->
  68. <ajc-test dir="features198/java17" vm="17" title="switch pattern matching aspect">
  69. <compile files="SwitchPatternAspect.aj" options="--enable-preview -17" />
  70. <run class="Application" vmargs="--enable-preview">
  71. <stdout>
  72. <line text="null" />
  73. <line text="int 123" />
  74. <line text="long 999" />
  75. <line text="double 12.340000" />
  76. <line text="String foo" />
  77. <line text="[123, foo, 999, 12.34]" />
  78. <line text="Non-circle" />
  79. <line text="Small circle" />
  80. <line text="Large circle" />
  81. <line text="Sealed sub-class A" />
  82. <line text="Sealed sub-class B" />
  83. <line text="Sealed sub-record C" />
  84. </stdout>
  85. </run>
  86. </ajc-test>
  87. <!-- Javac/ECJ 9+ compiler option, but belated implementation in AJC 1.9.7 -->
  88. <ajc-test dir="features198/compiler_release" vm="9" title="compile to older JDK release">
  89. <compile files="Buffers.java" options="--release 8"/>
  90. </ajc-test>
  91. <ajc-test dir="bugs198/github_115" title="annotation style A">
  92. <compile files="A.java" options="-1.5">
  93. <message kind="warning" line="28" text="advice defined in Azpect has not been applied [Xlint:adviceDidNotMatch]"/>
  94. </compile>
  95. <run class="A">
  96. <stdout>
  97. <line text="Azpect.before"/>
  98. <line text="A.main"/>
  99. </stdout>
  100. </run>
  101. </ajc-test>
  102. <ajc-test dir="bugs198/github_115" title="annotation style B">
  103. <compile files="B.java" options="-1.5"/>
  104. <run class="B">
  105. <stdout>
  106. <line text="Azpect.before"/>
  107. <line text="B.main"/>
  108. </stdout>
  109. </run>
  110. </ajc-test>
  111. </suite>