diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2022-01-08 16:06:51 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2022-01-08 16:06:51 +0700 |
commit | de63b63d8264efc9c81aa667546d028859b7a90c (patch) | |
tree | 75506eddf1ffe6d81780f091dae73044a3f072f2 /tests/src/test/java/org/aspectj | |
parent | 92779d0829d41d55cae300d4d4d5a67cff72916d (diff) | |
download | aspectj-de63b63d8264efc9c81aa667546d028859b7a90c.tar.gz aspectj-de63b63d8264efc9c81aa667546d028859b7a90c.zip |
Add test for Java 11 constant-dynamic
Relates to #68.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'tests/src/test/java/org/aspectj')
-rw-r--r-- | tests/src/test/java/org/aspectj/systemtest/ajc198/AllTestsAspectJ198.java | 3 | ||||
-rw-r--r-- | tests/src/test/java/org/aspectj/systemtest/ajc198/Bugs198Java11Tests.java | 32 |
2 files changed, 35 insertions, 0 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc198/AllTestsAspectJ198.java b/tests/src/test/java/org/aspectj/systemtest/ajc198/AllTestsAspectJ198.java index 4aac84810..3cfc7a149 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc198/AllTestsAspectJ198.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc198/AllTestsAspectJ198.java @@ -22,6 +22,9 @@ public class AllTestsAspectJ198 { if (LangUtil.is9VMOrGreater()) { suite.addTest(CompileWithReleaseTests.suite()); } + if (LangUtil.is11VMOrGreater()) { + suite.addTest(Bugs198Java11Tests.suite()); + } if (LangUtil.is17VMOrGreater()) { suite.addTest(SanityTestsJava17.suite()); suite.addTest(Ajc198TestsJava.suite()); diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc198/Bugs198Java11Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc198/Bugs198Java11Tests.java new file mode 100644 index 000000000..7e99b7d9f --- /dev/null +++ b/tests/src/test/java/org/aspectj/systemtest/ajc198/Bugs198Java11Tests.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright (c) 2021 Contributors + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + *******************************************************************************/ +package org.aspectj.systemtest.ajc198; + +import junit.framework.Test; +import org.aspectj.testing.XMLBasedAjcTestCase; +import org.aspectj.testing.XMLBasedAjcTestCaseForJava11OrLater; + +/** + * @author Alexander Kriegisch + */ +public class Bugs198Java11Tests extends XMLBasedAjcTestCaseForJava11OrLater { + + public void testGitHub_68() { + runTest("correctly weave code using constant-dynamic"); + } + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(Bugs198Java11Tests.class); + } + + @Override + protected java.net.URL getSpecFile() { + return getClassResource("ajc198.xml"); + } + +} |