diff options
Diffstat (limited to 'tests/src')
14 files changed, 30 insertions, 31 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc150/GenericsTests.java b/tests/src/test/java/org/aspectj/systemtest/ajc150/GenericsTests.java index ae44e9a60..ac432a706 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc150/GenericsTests.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc150/GenericsTests.java @@ -783,7 +783,7 @@ public class GenericsTests extends XMLBasedAjcTestCase { } public void testAfterReturningWithWildcardVar() { - if (LangUtil.is9VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(9)) { // See ReferenceType.isCoerceableFrom comments return; } diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java b/tests/src/test/java/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java index c7be1944c..fbc6cdca0 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java @@ -18,8 +18,7 @@ import org.aspectj.testing.XMLBasedAjcTestCase; import org.aspectj.util.FileUtil; import junit.framework.Test; - -import static org.aspectj.util.LangUtil.is16VMOrGreater; +import org.aspectj.util.LangUtil; /** * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a> @@ -143,7 +142,7 @@ public class AtAjLTWTests extends XMLBasedAjcTestCase { // // TODO: A better solution would be a recursive filtered search via Files.walk, ideally added as a recursive search // option for CountingFilenameFilter. - String proxyDir = is16VMOrGreater() ? "jdk/proxy1" : "com/sun/proxy"; + String proxyDir = LangUtil.isVMGreaterOrEqual(16) ? "jdk/proxy1" : "com/sun/proxy"; File f = new File(dir, "_ajdump/_before/" + proxyDir); CountingFilenameFilter cff = new CountingFilenameFilter(".class"); diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc190/ModuleTests.java b/tests/src/test/java/org/aspectj/systemtest/ajc190/ModuleTests.java index 70adf5667..a73c75077 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc190/ModuleTests.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc190/ModuleTests.java @@ -69,7 +69,7 @@ public class ModuleTests extends XMLBasedAjcTestCaseForJava9OrLater { // This tests that when using --add-modules with one of the JDK modules (in the jmods subfolder of the JDK) // that it can be found without needing to set --module-path (this seems to be implicitly included by javac too) public void testAddModules1() { - if (LangUtil.is11VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(11)) { // java.xml.bind is gone in Java11 return; } @@ -79,7 +79,7 @@ public class ModuleTests extends XMLBasedAjcTestCaseForJava9OrLater { // This tests that we can use add-modules to pull in something from the JDK jmods package and that // when subsequently weaving we can see types from those modules public void testWovenAfterAddModules() { - if (LangUtil.is11VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(11)) { // java.xml.bind is gone in Java11 return; } @@ -88,7 +88,7 @@ public class ModuleTests extends XMLBasedAjcTestCaseForJava9OrLater { // --limit-modules public void testLimitModules1() { - if (LangUtil.is11VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(11)) { // java.xml.bind is gone in Java11 return; } @@ -97,7 +97,7 @@ public class ModuleTests extends XMLBasedAjcTestCaseForJava9OrLater { // --add-reads public void testAddReads1() { - if (LangUtil.is11VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(11)) { // java.xml.bind is gone in Java11 return; } diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc1919/AllTestsAspectJ1919.java b/tests/src/test/java/org/aspectj/systemtest/ajc1919/AllTestsAspectJ1919.java index e7b67db7b..22e7b6184 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc1919/AllTestsAspectJ1919.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc1919/AllTestsAspectJ1919.java @@ -19,13 +19,13 @@ public class AllTestsAspectJ1919 { public static Test suite() { TestSuite suite = new TestSuite("AspectJ 1.9.19 tests"); suite.addTest(Bugs1919Tests.suite()); - if (LangUtil.is19VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(19)) { suite.addTest(SanityTestsJava19.suite()); suite.addTest(Ajc1919TestsJava.suite()); } // Do not run tests using a previous compiler's preview features anymore. They would all fail. /* - if (LangUtil.is19VMOrGreater() && !LangUtil.is20VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(19) && !LangUtil.isVMGreaterOrEqual(20)) { suite.addTest(Java19PreviewFeaturesTests.suite()); } */ diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc1920/AllTestsAspectJ1920.java b/tests/src/test/java/org/aspectj/systemtest/ajc1920/AllTestsAspectJ1920.java index a095eb758..ae80c49bc 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc1920/AllTestsAspectJ1920.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc1920/AllTestsAspectJ1920.java @@ -19,13 +19,13 @@ public class AllTestsAspectJ1920 { public static Test suite() { TestSuite suite = new TestSuite("AspectJ 1.9.20 tests"); suite.addTest(Bugs1920Tests.suite()); - if (LangUtil.is20VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(20)) { suite.addTest(SanityTestsJava20.suite()); suite.addTest(Ajc1920TestsJava.suite()); } // Do not run tests using a previous compiler's preview features anymore. They would all fail. /* - if (LangUtil.is20VMOrGreater() && !LangUtil.is21VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(20) && !LangUtil.isVMGreaterOrEqual(21)) { suite.addTest(Java20PreviewFeaturesTests.suite()); } */ diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc1921/AllTestsAspectJ1921.java b/tests/src/test/java/org/aspectj/systemtest/ajc1921/AllTestsAspectJ1921.java index 30b6728f1..56e8b963a 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc1921/AllTestsAspectJ1921.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc1921/AllTestsAspectJ1921.java @@ -31,14 +31,14 @@ public class AllTestsAspectJ1921 { public static Test suite() { TestSuite suite = new TestSuite("AspectJ 1.9.21 tests"); suite.addTest(Bugs1921Tests.suite()); - if (LangUtil.is21VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(21)) { suite.addTest(SanityTestsJava21.suite()); suite.addTest(Ajc1921TestsJava.suite()); } // AspectJ_JDK_Update // Do not run tests using a previous compiler's preview features anymore. They would all fail. // TODO: Comment out the following block when upgrading JDT Core to Java 22 - if (LangUtil.is21VMOrGreater() && !LangUtil.is22VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(21) && !LangUtil.isVMGreaterOrEqual(22)) { suite.addTest(Java21PreviewFeaturesTests.suite()); } return suite; diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc195/AllTestsAspectJ195.java b/tests/src/test/java/org/aspectj/systemtest/ajc195/AllTestsAspectJ195.java index e84b6ee4f..092160565 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc195/AllTestsAspectJ195.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc195/AllTestsAspectJ195.java @@ -20,7 +20,7 @@ public class AllTestsAspectJ195 { public static Test suite() { TestSuite suite = new TestSuite("AspectJ 1.9.5 tests"); suite.addTest(Ajc195Tests.suite()); - if (LangUtil.is13VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(13)) { suite.addTest(SanityTestsJava13.suite()); } return suite; diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc196/AllTestsAspectJ196.java b/tests/src/test/java/org/aspectj/systemtest/ajc196/AllTestsAspectJ196.java index d3cbfb9ab..8e19afc14 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc196/AllTestsAspectJ196.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc196/AllTestsAspectJ196.java @@ -19,13 +19,13 @@ public class AllTestsAspectJ196 { public static Test suite() { TestSuite suite = new TestSuite("AspectJ 1.9.6 tests"); - if (LangUtil.is14VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(14)) { suite.addTest(Ajc196Tests.suite()); suite.addTest(SanityTestsJava14.suite()); } // Do not run tests using a previous compiler's preview features anymore. They would all fail. /* - if (LangUtil.is14VMOrGreater() && !LangUtil.is15VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(14) && !LangUtil.isVMGreaterOrEqual(15)) { suite.addTest(Java14PreviewFeaturesTests.suite()); } */ diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc197/AllTestsAspectJ197.java b/tests/src/test/java/org/aspectj/systemtest/ajc197/AllTestsAspectJ197.java index fe767e639..7feccc2e2 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc197/AllTestsAspectJ197.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc197/AllTestsAspectJ197.java @@ -18,16 +18,16 @@ public class AllTestsAspectJ197 { public static Test suite() { TestSuite suite = new TestSuite("AspectJ 1.9.7 tests"); - if (LangUtil.is15VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(15)) { suite.addTest(SanityTestsJava15.suite()); } - if (LangUtil.is16VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(16)) { suite.addTest(SanityTestsJava16.suite()); suite.addTest(Ajc197TestsJava.suite()); } // Do not run tests using a previous compiler's preview features anymore. They would all fail. /* - if (LangUtil.is16VMOrGreater() && !LangUtil.is17VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(16) && !LangUtil.isVMGreaterOrEqual(17)) { suite.addTest(Java16PreviewFeaturesTests.suite()); } */ 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 929b5749d..8e84af9fd 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc198/AllTestsAspectJ198.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc198/AllTestsAspectJ198.java @@ -19,19 +19,19 @@ public class AllTestsAspectJ198 { public static Test suite() { TestSuite suite = new TestSuite("AspectJ 1.9.8 tests"); suite.addTest(Bugs198Tests.suite()); - if (LangUtil.is9VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(9)) { suite.addTest(CompileWithReleaseTests.suite()); } - if (LangUtil.is11VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(11)) { suite.addTest(Bugs198Java11Tests.suite()); } - if (LangUtil.is17VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(17)) { suite.addTest(SanityTestsJava17.suite()); suite.addTest(Ajc198TestsJava.suite()); } // Do not run tests using a previous compiler's preview features anymore. They would all fail. /* - if (LangUtil.is17VMOrGreater() && !LangUtil.is18VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(17) && !LangUtil.isVMGreaterOrEqual(18)) { suite.addTest(Java17PreviewFeaturesTests.suite()); } */ diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc199/AllTestsAspectJ199.java b/tests/src/test/java/org/aspectj/systemtest/ajc199/AllTestsAspectJ199.java index 6b77073be..724fcdf62 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc199/AllTestsAspectJ199.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc199/AllTestsAspectJ199.java @@ -19,13 +19,13 @@ public class AllTestsAspectJ199 { public static Test suite() { TestSuite suite = new TestSuite("AspectJ 1.9.9 tests"); suite.addTest(Bugs199Tests.suite()); - if (LangUtil.is18VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(18)) { suite.addTest(SanityTestsJava18.suite()); suite.addTest(Ajc199TestsJava.suite()); } // Do not run tests using a previous compiler's preview features anymore. They would all fail. /* - if (LangUtil.is18VMOrGreater() && !LangUtil.is19VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(18) && !LangUtil.isVMGreaterOrEqual(19)) { suite.addTest(Java18PreviewFeaturesTests.suite()); } */ diff --git a/tests/src/test/java/org/aspectj/systemtest/apt/AptTests.java b/tests/src/test/java/org/aspectj/systemtest/apt/AptTests.java index 24bc32dd1..62dac6e6e 100644 --- a/tests/src/test/java/org/aspectj/systemtest/apt/AptTests.java +++ b/tests/src/test/java/org/aspectj/systemtest/apt/AptTests.java @@ -23,7 +23,7 @@ import junit.framework.Test; public class AptTests extends XMLBasedAjcTestCase { public void testAptWithSpecifiedProcessor() { - if (LangUtil.is9VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(9)) { return; } runTest("annotation processing with specified processor"); @@ -33,14 +33,14 @@ public class AptTests extends XMLBasedAjcTestCase { * SPI - https://docs.oracle.com/javase/tutorial/sound/SPI-intro.html */ public void testAptUsingSPI() { - if (LangUtil.is9VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(9)) { return; } runTest("annotation processing in action using SPI"); } public void testDisabledApt() { - if (LangUtil.is11VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(11)) { // javax.annotation.Generated not in Java11 return; } diff --git a/tests/src/test/java/org/aspectj/systemtest/incremental/tools/MultiProjTestCompilerConfiguration.java b/tests/src/test/java/org/aspectj/systemtest/incremental/tools/MultiProjTestCompilerConfiguration.java index 52602114e..7f15341e9 100644 --- a/tests/src/test/java/org/aspectj/systemtest/incremental/tools/MultiProjTestCompilerConfiguration.java +++ b/tests/src/test/java/org/aspectj/systemtest/incremental/tools/MultiProjTestCompilerConfiguration.java @@ -76,7 +76,7 @@ public class MultiProjTestCompilerConfiguration implements ICompilerConfiguratio + "../lib/junit/junit.jar" + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "test" + File.separator + "aspectjrt.jar"; verifyClasspath(cp); - if (LangUtil.is9VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(9)) { cp = LangUtil.getJrtFsFilePath() + File.pathSeparator + cp; } diff --git a/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java b/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java index cf07bfd9d..993b457f8 100644 --- a/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java +++ b/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java @@ -26,7 +26,7 @@ public class TestsModuleTests extends TestCase { String name = TestsModuleTests.class.getName(); TestSuite suite = new TestSuite(name); // compiler tests, wrapped for JUnit - if (LangUtil.is9VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(9)) { suite.addTest(AllTests19.suite()); } else { suite.addTest(AllTests18.suite()); |