diff options
author | Andy Clement <aclement@pivotal.io> | 2020-04-20 16:24:02 -0700 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2020-04-20 16:24:02 -0700 |
commit | 4471ba76ac755b504d99e514a1cf5a375e7d02d1 (patch) | |
tree | 5f8d4f4dfb79d72f6c344294a319b0b04b01e2ae /tests/src/test/resources/org/aspectj/systemtest/ajc196 | |
parent | 17026e35243f229c2e3c07c292f2caaac65503a4 (diff) | |
download | aspectj-4471ba76ac755b504d99e514a1cf5a375e7d02d1.tar.gz aspectj-4471ba76ac755b504d99e514a1cf5a375e7d02d1.zip |
Include JDTCore for Java14
Diffstat (limited to 'tests/src/test/resources/org/aspectj/systemtest/ajc196')
-rw-r--r-- | tests/src/test/resources/org/aspectj/systemtest/ajc196/ajc196.xml | 118 | ||||
-rw-r--r-- | tests/src/test/resources/org/aspectj/systemtest/ajc196/sanity-tests-14.xml | 69 |
2 files changed, 187 insertions, 0 deletions
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc196/ajc196.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc196/ajc196.xml new file mode 100644 index 000000000..cd5a4870a --- /dev/null +++ b/tests/src/test/resources/org/aspectj/systemtest/ajc196/ajc196.xml @@ -0,0 +1,118 @@ +<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]> + +<suite> + + <!-- switch now in Java14 and doesn't need -enable-preview flag --> + <ajc-test dir="features193" vm="14" title="switch 1"> + <compile files="Switch1.java" options="-14"> + </compile> + <run class="Switch1" vmargs="--enable-preview"> + <stdout> + <line text="0" /> + <line text="1" /> + <line text="2" /> + <line text="3" /> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="features193" vm="14" title="switch 2"> + <compile files="Switch2.java" options="-source 14"> + </compile> + <run class="Switch2" vmargs=""> + <stdout> + <line text="0" /> + <line text="2" /> + <line text="4" /> + <line text="6" /> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="features193" vm="14" title="switch 3"> + <compile files="Switch3.java" options="-source 14"> + </compile> + <run class="Switch3" vmargs=""> + <stdout> + <line text="3" /> + <line text="6" /> + <line text="9" /> + <line text="12" /> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs196/java14" vm="14" title="simple record"> + <compile files="Person.java" options="--enable-preview -14" /> + </ajc-test> + + <ajc-test dir="bugs196/java14" vm="14" title="using a record"> + <compile files="Person.java UsingPersonRecord.java" + options="--enable-preview -14" /> + <run class="UsingPersonRecord" vmargs="--enable-preview"> + <stdout> + <line text="Person[firstName=A, lastName=B, age=99]" /> + <line text="A" /> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs196/java14" vm="14" + title="instanceof patterns"> + <compile files="Jep305.java" options="--enable-preview -14" /> + <run class="Jep305" vmargs="--enable-preview"> + <stdout> + <line text="orange" /> + <line text="apple" /> + </stdout> + </run> + </ajc-test> + + + <ajc-test dir="bugs196/java14" vm="14" + title="advising records"> + <compile + files="TraceRecordComponents.aj Person.java UsingPersonRecord.java" + options="--enable-preview -14" /> + <run class="UsingPersonRecord" vmargs="--enable-preview"> + <stdout> + <line text="execution(String Person.toString())" /> + <line text="Person[firstName=A, lastName=B, age=99]" /> + <line text="execution(String Person.firstName())" /> + <line text="A" /> + </stdout> + </run> + </ajc-test> + + + <!-- textblock still in preview at 14 level --> + <ajc-test dir="features195/textblock" vm="14" + title="textblock 1"> + <compile files="Code.java" + options="--enable-preview -source 14"> + </compile> + <run class="Code" vmargs="--enable-preview"> + <stdout> + <line text="this is a text" /> + <!-- the incidental space is removed with a trim in output matching but + the test app doesn't remove it when printing it, why? --> + <line text="block" /> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="features195/textblock" vm="14" + title="textblock 2"> + <compile files="Code2.java" + options="--enable-preview -source 14"> + </compile> + <run class="Code2" vmargs="--enable-preview"> + <stdout> + <!-- why is the incidental space not removed here?? --> + <line text="this is a text" /> + <line text="block in advice" /> + </stdout> + </run> + </ajc-test> + +</suite> diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc196/sanity-tests-14.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc196/sanity-tests-14.xml new file mode 100644 index 000000000..e831c9916 --- /dev/null +++ b/tests/src/test/resources/org/aspectj/systemtest/ajc196/sanity-tests-14.xml @@ -0,0 +1,69 @@ +<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]> + +<suite> + + <!-- empty class --> + <ajc-test dir="bugs160/simplejava" title="simple - a"> + <compile files="SimpleA.java" options="-14"/> + </ajc-test> + + <!-- class with one method --> + <ajc-test dir="bugs160/simplejava" title="simple - b"> + <compile files="SimpleB.java" options="-14"/> + <run class="SimpleB"/> + </ajc-test> + + <!-- empty aspect --> + <ajc-test dir="bugs160/simplejava" title="simple - c"> + <compile files="SimpleC.java" options="-13"/> + </ajc-test> + + <!-- simple before --> + <ajc-test dir="bugs160/simplejava" title="simple - d"> + <compile files="SimpleD.java" options="-14"/> + </ajc-test> + + <!-- simple itd field --> + <ajc-test dir="bugs160/simplejava" title="simple - e"> + <compile files="SimpleE.java" options="-14"/> + </ajc-test> + + <!-- aspect with main calling a static method --> + <ajc-test dir="bugs160/simplejava" title="simple - f"> + <compile files="SimpleF.java" options="-14"/> + </ajc-test> + + <!-- pertarget --> + <ajc-test dir="bugs160/simplejava" title="simple - g"> + <compile files="SimpleG.java" options="-14"/> + </ajc-test> + + <!-- generic ctor itds --> + <ajc-test dir="bugs160/simplejava" title="simple - h"> + <compile files="SimpleH.java" options="-14"/> + </ajc-test> + + <!-- overriding generic itd methods --> + <ajc-test dir="bugs160/simplejava" title="simple - i"> + <compile files="SimpleI.java" options="-14"/> + </ajc-test> + + <!-- check class file version is 57.0 --> + <ajc-test dir="bugs160/simplejava" title="simple - j"> + <compile files="SimpleJ.java" options="-14"/> + </ajc-test> + + <!-- check class file version is 57.0 --> + <ajc-test dir="bugs160/simplejava" title="simple - k"> + <compile files="SimpleJ.java" options="-source 14"/> + </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="-14"/> + </ajc-test> +</suite> |