aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/test/resources')
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml69
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc199/ajc199.xml177
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc199/sanity-tests-18.xml70
3 files changed, 248 insertions, 68 deletions
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml
index 0eb413baa..85bd872b3 100644
--- a/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc198/ajc198.xml
@@ -95,76 +95,9 @@
</run>
</ajc-test>
- <!-- Javac/ECJ 9+ compiler option, but belated implementation in AJC 1.9.7 -->
+ <!-- Javac/ECJ 9+ compiler option, but belated implementation in AJC 1.9.8 -->
<ajc-test dir="features198/compiler_release" vm="9" title="compile to older JDK release">
<compile files="Buffers.java" options="--release 8"/>
</ajc-test>
- <ajc-test dir="bugs198/github_115" title="annotation style A">
- <compile files="A.java" options="-1.5">
- <message kind="warning" line="28" text="advice defined in Azpect has not been applied [Xlint:adviceDidNotMatch]"/>
- </compile>
- <run class="A">
- <stdout>
- <line text="Azpect.before"/>
- <line text="A.main"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs198/github_115" title="annotation style B">
- <compile files="B.java" options="-1.5"/>
- <run class="B">
- <stdout>
- <line text="Azpect.before"/>
- <line text="B.main"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs198/github_120" title="annotation style C">
- <compile files="C.java" options="-1.5"/>
- <run class="C">
- <stdout>
- <line text="check if() pointcut running on C(1)"/>
- <line text="Azpect1.beforeAdvice executing"/>
- <line text="C.run() executing"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs198/github_120" title="annotation style D">
- <compile files="D.java" options="-1.5"/>
- <run class="D">
- <stdout>
- <line text="advice running"/>
- <line text="D.run() executing"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs198/github_122" title="annotation style negated if">
- <compile files="E.java" options="-1.5"/>
- <run class="E">
- <stdout>
- <line text="advice running"/>
- <line text="E.run() executing"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs198/github_125" title="compiler can re-open closed JARs">
- <!--
- Here the Java test sets system property org.aspectj.weaver.openarchives to 20 in order to provoke
- open JAR limit exhaustion
- -->
- <compile files="Application.java" options="-1.5" />
- <run class="Application">
- <stdout>
- <line text="Before advice"/>
- <line text="Hello world!"/>
- </stdout>
- </run>
- </ajc-test>
-
</suite>
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc199/ajc199.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc199/ajc199.xml
new file mode 100644
index 000000000..f76858a3b
--- /dev/null
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc199/ajc199.xml
@@ -0,0 +1,177 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+
+<suite>
+
+ <!-- Java 18 final: no new features, only 2nd preview for "JEP 420: Pattern Matching for switch (Second Preview)" -->
+ <ajc-test dir="features199/java18" vm="18" title="dummy Java 18">
+ </ajc-test>
+
+ <!-- Java ?? final, Java 17, 18 preview -->
+ <ajc-test dir="features198/java17" vm="18" title="switch pattern matching error">
+ <compile files="SwitchPatternError.java" options="--enable-preview -18">
+ <!-- TODO: Add correct compiler error message, as soon as JDT Core supports it -->
+ <message kind="error" file="SwitchPatternError.java" text="This case label is dominated by one of the preceding case label"/>
+ </compile>
+ </ajc-test>
+
+ <!-- Java ?? final, Java 17, 18 preview -->
+ <ajc-test dir="features198/java17" vm="18" title="switch pattern matching java">
+ <compile files="SwitchPatternOK.java" options="--enable-preview -18" />
+ <run class="SwitchPatternOK" vmargs="--enable-preview">
+ <stdout>
+ <line text="null" />
+ <line text="int 123" />
+ <line text="long 999" />
+ <line text="double 12.340000" />
+ <line text="String foo" />
+ <line text="[123, foo, 999, 12.34]" />
+ <line text="Non-circle" />
+ <line text="Small circle" />
+ <line text="Large circle" />
+ <line text="Sealed sub-class A" />
+ <line text="Sealed sub-class B" />
+ <line text="Sealed sub-record C" />
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <!-- Java ?? final, Java 17, 18 preview -->
+ <ajc-test dir="features198/java17" vm="18" title="switch pattern matching aspect">
+ <compile files="SwitchPatternAspect.aj" options="--enable-preview -18" />
+ <run class="Application" vmargs="--enable-preview">
+ <stdout>
+ <line text="null" />
+ <line text="int 123" />
+ <line text="long 999" />
+ <line text="double 12.340000" />
+ <line text="String foo" />
+ <line text="[123, foo, 999, 12.34]" />
+ <line text="Non-circle" />
+ <line text="Small circle" />
+ <line text="Large circle" />
+ <line text="Sealed sub-class A" />
+ <line text="Sealed sub-class B" />
+ <line text="Sealed sub-record C" />
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <!-- Java ?? final, Java 17, 18 preview -->
+ <ajc-test dir="features199/java18" vm="18" title="switch pattern matching preview 2 error">
+ <compile files="SwitchPatternPreview2Error.java" options="--enable-preview -18">
+ <!-- TODO: Add correct compiler error message, as soon as JDT Core supports it -->
+ <message kind="error" file="SwitchPatternError.java" text="This case label is dominated by one of the preceding case label"/>
+ </compile>
+ </ajc-test>
+
+ <!-- Java ?? final, Java 17, 18 preview -->
+ <ajc-test dir="features199/java18" vm="18" title="switch pattern matching preview 2 java">
+ <compile files="SwitchPatternPreview2OK.java" options="--enable-preview -18" />
+ <run class="SwitchPatternOK" vmargs="--enable-preview">
+ <stdout>
+ <line text="null" />
+ <line text="int 123" />
+ <line text="long 999" />
+ <line text="double 12.340000" />
+ <line text="String foo" />
+ <line text="[123, foo, 999, 12.34]" />
+ <line text="Non-circle" />
+ <line text="Small circle" />
+ <line text="Large circle" />
+ <line text="Sealed sub-class A" />
+ <line text="Sealed sub-class B" />
+ <line text="Sealed sub-record C" />
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <!-- Java ?? final, Java 17, 18 preview -->
+ <ajc-test dir="features199/java18" vm="18" title="switch pattern matching preview 2 aspect">
+ <compile files="SwitchPatternPreview2Aspect.aj" options="--enable-preview -18" />
+ <run class="Application" vmargs="--enable-preview">
+ <stdout>
+ <line text="null" />
+ <line text="int 123" />
+ <line text="long 999" />
+ <line text="double 12.340000" />
+ <line text="String foo" />
+ <line text="[123, foo, 999, 12.34]" />
+ <line text="Non-circle" />
+ <line text="Small circle" />
+ <line text="Large circle" />
+ <line text="Sealed sub-class A" />
+ <line text="Sealed sub-class B" />
+ <line text="Sealed sub-record C" />
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs199/github_115" title="annotation style A">
+ <compile files="A.java" options="-1.5">
+ <message kind="warning" line="28" text="advice defined in Azpect has not been applied [Xlint:adviceDidNotMatch]"/>
+ </compile>
+ <run class="A">
+ <stdout>
+ <line text="Azpect.before"/>
+ <line text="A.main"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs199/github_115" title="annotation style B">
+ <compile files="B.java" options="-1.5"/>
+ <run class="B">
+ <stdout>
+ <line text="Azpect.before"/>
+ <line text="B.main"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs199/github_120" title="annotation style C">
+ <compile files="C.java" options="-1.5"/>
+ <run class="C">
+ <stdout>
+ <line text="check if() pointcut running on C(1)"/>
+ <line text="Azpect1.beforeAdvice executing"/>
+ <line text="C.run() executing"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs199/github_120" title="annotation style D">
+ <compile files="D.java" options="-1.5"/>
+ <run class="D">
+ <stdout>
+ <line text="advice running"/>
+ <line text="D.run() executing"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs199/github_122" title="annotation style negated if">
+ <compile files="E.java" options="-1.5"/>
+ <run class="E">
+ <stdout>
+ <line text="advice running"/>
+ <line text="E.run() executing"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs199/github_125" title="compiler can re-open closed JARs">
+ <!--
+ Here the Java test sets system property org.aspectj.weaver.openarchives to 20 in order to provoke
+ open JAR limit exhaustion
+ -->
+ <compile files="Application.java" options="-1.5" />
+ <run class="Application">
+ <stdout>
+ <line text="Before advice"/>
+ <line text="Hello world!"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+</suite>
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc199/sanity-tests-18.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc199/sanity-tests-18.xml
new file mode 100644
index 000000000..30c9660a1
--- /dev/null
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc199/sanity-tests-18.xml
@@ -0,0 +1,70 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<suite>
+
+ <!-- empty class -->
+ <ajc-test dir="bugs160/simplejava" title="simple - a">
+ <compile files="SimpleA.java" options="-18"/>
+ </ajc-test>
+
+ <!-- class with one method -->
+ <ajc-test dir="bugs160/simplejava" title="simple - b">
+ <compile files="SimpleB.java" options="-18"/>
+ <run class="SimpleB"/>
+ </ajc-test>
+
+ <!-- empty aspect -->
+ <ajc-test dir="bugs160/simplejava" title="simple - c">
+ <compile files="SimpleC.java" options="-18"/>
+ </ajc-test>
+
+ <!-- simple before -->
+ <ajc-test dir="bugs160/simplejava" title="simple - d">
+ <compile files="SimpleD.java" options="-18"/>
+ </ajc-test>
+
+ <!-- simple itd field -->
+ <ajc-test dir="bugs160/simplejava" title="simple - e">
+ <compile files="SimpleE.java" options="-18"/>
+ </ajc-test>
+
+ <!-- aspect with main calling a static method -->
+ <ajc-test dir="bugs160/simplejava" title="simple - f">
+ <compile files="SimpleF.java" options="-18"/>
+ </ajc-test>
+
+ <!-- pertarget -->
+ <ajc-test dir="bugs160/simplejava" title="simple - g">
+ <compile files="SimpleG.java" options="-18"/>
+ </ajc-test>
+
+ <!-- generic ctor itds -->
+ <ajc-test dir="bugs160/simplejava" title="simple - h">
+ <compile files="SimpleH.java" options="-18"/>
+ </ajc-test>
+
+ <!-- overriding generic itd methods -->
+ <ajc-test dir="bugs160/simplejava" title="simple - i">
+ <compile files="SimpleI.java" options="-18"/>
+ </ajc-test>
+
+ <!-- check class file version is 62.0 (Java 18) -->
+ <ajc-test dir="bugs160/simplejava" title="simple - j">
+ <compile files="SimpleJ.java" options="-18"/>
+ </ajc-test>
+
+ <!-- check class file version is 62.0 (Java 18) -->
+ <ajc-test dir="bugs160/simplejava" title="simple - k">
+ <compile files="SimpleJ.java" options="-source 18"/>
+ </ajc-test>
+
+ <!-- check class file version is 49.0 -->
+ <ajc-test dir="bugs160/simplejava" title="simple - m">
+ <compile files="SimpleJ.java" options="-1.5"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs160/simplejava" title="simple - n">
+ <compile files="SimpleN.java" options="-18"/>
+ </ajc-test>
+
+</suite>