diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2024-02-19 22:01:05 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2024-02-19 22:01:05 +0700 |
commit | 47db35bb48a1ef0919dff62521ca38cd7cf3ccec (patch) | |
tree | fce4041a52368870ec8beb8eb5b9a16f36b98ecc /tests/src/test/java/org/aspectj/systemtest/ajc197/SanityTestsJava16.java | |
parent | 4e4641f8cc06176377a1faf8378e93df9bf248e1 (diff) | |
download | aspectj-47db35bb48a1ef0919dff62521ca38cd7cf3ccec.tar.gz aspectj-47db35bb48a1ef0919dff62521ca38cd7cf3ccec.zip |
New abstract class JavaVersionSpecificXMLBasedAjcTestCase
Replaces now obsolete base classes
- XMLBasedAjcTestCaseForJava[n]OrLater,
- XMLBasedAjcTestCaseForJava[n]Only.
The new class is parametrised with minimum and maximum Java version and
hence can replace all the other classes. This does not only apply the
DRY principle, but also makes adding tests for new Java versions less
tedious.
By chance, I also noticed missing sanity tests for Java 12, which I
added as a little drive-by benefit.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'tests/src/test/java/org/aspectj/systemtest/ajc197/SanityTestsJava16.java')
-rw-r--r-- | tests/src/test/java/org/aspectj/systemtest/ajc197/SanityTestsJava16.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc197/SanityTestsJava16.java b/tests/src/test/java/org/aspectj/systemtest/ajc197/SanityTestsJava16.java index 1e42ce6d7..d86264a91 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc197/SanityTestsJava16.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc197/SanityTestsJava16.java @@ -9,8 +9,8 @@ package org.aspectj.systemtest.ajc197; import junit.framework.Test; import org.aspectj.apache.bcel.Constants; +import org.aspectj.testing.JavaVersionSpecificXMLBasedAjcTestCase; import org.aspectj.testing.XMLBasedAjcTestCase; -import org.aspectj.testing.XMLBasedAjcTestCaseForJava16OrLater; /* * Some very trivial tests that help verify things are OK. @@ -19,10 +19,14 @@ import org.aspectj.testing.XMLBasedAjcTestCaseForJava16OrLater; * * @author Alexander Kriegisch */ -public class SanityTestsJava16 extends XMLBasedAjcTestCaseForJava16OrLater { +public class SanityTestsJava16 extends JavaVersionSpecificXMLBasedAjcTestCase { public static final int bytecode_version_for_JDK_level = Constants.ClassFileVersion.of(16).MAJOR; + public SanityTestsJava16() { + super(16); + } + // Incredibly trivial test programs that check the compiler works at all (these are easy-ish to debug) public void testSimpleJava_A() { runTest("simple - a"); |