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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
  2. <suite>
  3. <!-- Java 17 final, Java 16, 15 preview -->
  4. <ajc-test dir="features197/java15" vm="17" title="sealed class with legal subclasses">
  5. <compile files="Person.java Employee.java Manager.java" options="-17" />
  6. </ajc-test>
  7. <!-- Java 17 final, Java 16, 15 preview -->
  8. <ajc-test dir="features197/java15" vm="17" title="sealed class with illegal subclass">
  9. <compile files="Person.java Employee.java Manager.java PersonaNonGrata.java" options="-17">
  10. <message kind="error" file="PersonaNonGrata.java" text="should be a permitted subtype of Person"/>
  11. </compile>
  12. </ajc-test>
  13. <!-- Java 17 final, Java 16, 15 preview -->
  14. <ajc-test dir="features197/java15" vm="17" title="weave sealed class">
  15. <compile files="Person.java Employee.java Manager.java TopManager.java PersonAspect.aj" options="-17" />
  16. <run class="TopManager">
  17. <stdout>
  18. <line text="Hello Sir John" />
  19. <line text="CEO" />
  20. </stdout>
  21. </run>
  22. </ajc-test>
  23. <!-- Java ?? final, Java 17 preview -->
  24. <ajc-test dir="features198/java17" vm="17" title="switch pattern matching error">
  25. <compile files="SwitchPatternError.java" options="--enable-preview -17">
  26. <!-- TODO: Add correct compiler error message, as soon as JDT Core supports it -->
  27. <message kind="error" file="SwitchPatternError.java" text="This case label is dominated by one of the preceding case label"/>
  28. </compile>
  29. </ajc-test>
  30. <!-- Java ?? final, Java 17 preview -->
  31. <ajc-test dir="features198/java17" vm="17" title="switch pattern matching java">
  32. <compile files="SwitchPatternOK.java" options="--enable-preview -17" />
  33. <run class="SwitchPatternOK" vmargs="--enable-preview">
  34. <stdout>
  35. <line text="null" />
  36. <line text="int 123" />
  37. <line text="long 999" />
  38. <line text="double 12.340000" />
  39. <line text="String foo" />
  40. <line text="[123, foo, 999, 12.34]" />
  41. <line text="Non-circle" />
  42. <line text="Small circle" />
  43. <line text="Large circle" />
  44. <line text="Sealed sub-class A" />
  45. <line text="Sealed sub-class B" />
  46. <line text="Sealed sub-record C" />
  47. </stdout>
  48. </run>
  49. </ajc-test>
  50. <!-- Java ?? final, Java 17 preview -->
  51. <ajc-test dir="features198/java17" vm="17" title="switch pattern matching aspect">
  52. <compile files="SwitchPatternAspect.aj" options="--enable-preview -17" />
  53. <run class="Application" vmargs="--enable-preview">
  54. <stdout>
  55. <line text="null" />
  56. <line text="int 123" />
  57. <line text="long 999" />
  58. <line text="double 12.340000" />
  59. <line text="String foo" />
  60. <line text="[123, foo, 999, 12.34]" />
  61. <line text="Non-circle" />
  62. <line text="Small circle" />
  63. <line text="Large circle" />
  64. <line text="Sealed sub-class A" />
  65. <line text="Sealed sub-class B" />
  66. <line text="Sealed sub-record C" />
  67. </stdout>
  68. </run>
  69. </ajc-test>
  70. <!-- Javac/ECJ 9+ compiler option, but belated implementation in AJC 1.9.7 -->
  71. <ajc-test dir="features198/compiler_release" vm="9" title="compile to older JDK release">
  72. <compile files="Buffers.java" options="--release 8"/>
  73. </ajc-test>
  74. </suite>