From c80551f1d36e288b4b3be658e70c0560b7e04c9e Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Wed, 28 Jul 2021 10:49:46 +0700 Subject: [PATCH] Test comment cosmetics Signed-off-by: Alexander Kriegisch --- .../org/aspectj/testing/XMLBasedAjcTestCaseForJava14Only.java | 2 ++ .../org/aspectj/testing/XMLBasedAjcTestCaseForJava15Only.java | 2 ++ .../java/org/aspectj/systemtest/ajc192/SanityTestsJava11.java | 2 +- .../java/org/aspectj/systemtest/ajc195/SanityTestsJava13.java | 2 +- .../org/aspectj/systemtest/ajc196/AllTestsAspectJ196.java | 4 ++-- .../java/org/aspectj/systemtest/ajc196/SanityTestsJava14.java | 2 +- .../org/aspectj/systemtest/ajc197/AllTestsAspectJ197.java | 3 +++ .../java/org/aspectj/systemtest/ajc197/SanityTestsJava15.java | 2 +- .../java/org/aspectj/systemtest/ajc197/SanityTestsJava16.java | 2 +- .../org/aspectj/systemtest/ajc198/AllTestsAspectJ198.java | 2 +- .../java/org/aspectj/systemtest/ajc198/SanityTestsJava17.java | 2 +- 11 files changed, 16 insertions(+), 9 deletions(-) diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava14Only.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava14Only.java index ece127651..70ebef477 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava14Only.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava14Only.java @@ -17,11 +17,13 @@ public abstract class XMLBasedAjcTestCaseForJava14Only extends XMLBasedAjcTestCa @Override public void setUp() throws Exception { + // Activate this block after upgrading to JDT Core Java 15 throw new IllegalStateException( "These tests need a Java 14 level AspectJ compiler " + "(e.g. because they use version-specific preview features). " + "This compiler does not support preview features of a previous version anymore." ); + // Activate this block before upgrading to JDT Core Java 15 /* if (!LangUtil.is14VMOrGreater() || LangUtil.is15VMOrGreater()) { throw new IllegalStateException( diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava15Only.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava15Only.java index 868ece1e3..5b64445a9 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava15Only.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava15Only.java @@ -17,11 +17,13 @@ public abstract class XMLBasedAjcTestCaseForJava15Only extends XMLBasedAjcTestCa @Override public void setUp() throws Exception { + // Activate this block after upgrading to JDT Core Java 16 throw new IllegalStateException( "These tests need a Java 15 level AspectJ compiler " + "(e.g. because they use version-specific preview features). " + "This compiler does not support preview features of a previous version anymore." ); + // Activate this block before upgrading to JDT Core Java 16 /* if (!LangUtil.is15VMOrGreater() || LangUtil.is16VMOrGreater()) { throw new IllegalStateException( diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc192/SanityTestsJava11.java b/tests/src/test/java/org/aspectj/systemtest/ajc192/SanityTestsJava11.java index 806cdc55b..329b3f880 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc192/SanityTestsJava11.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc192/SanityTestsJava11.java @@ -14,7 +14,7 @@ import junit.framework.Test; /* * Some very trivial tests that help verify things are OK. - * These are a copy of the earlier Sanity Tests created for 1.6 but these supply the -10 option + * These are a copy of the earlier Sanity Tests created for 1.6 but these supply the -11 option * to check code generation and modification with that version specified. * * @author Andy Clement diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc195/SanityTestsJava13.java b/tests/src/test/java/org/aspectj/systemtest/ajc195/SanityTestsJava13.java index c3acd04b2..f8cffca69 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc195/SanityTestsJava13.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc195/SanityTestsJava13.java @@ -14,7 +14,7 @@ import junit.framework.Test; /* * Some very trivial tests that help verify things are OK. - * These are a copy of the earlier Sanity Tests created for 1.6 but these supply the -10 option + * These are a copy of the earlier Sanity Tests created for 1.6 but these supply the -13 option * to check code generation and modification with that version specified. * * @author Andy Clement 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 08013d697..c2e13b550 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc196/AllTestsAspectJ196.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc196/AllTestsAspectJ196.java @@ -24,11 +24,11 @@ public class AllTestsAspectJ196 { 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()) { suite.addTest(Ajc196PreviewFeaturesTests.suite()); } -*/ + */ return suite; } } diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc196/SanityTestsJava14.java b/tests/src/test/java/org/aspectj/systemtest/ajc196/SanityTestsJava14.java index 554832dd2..6857b4d8a 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc196/SanityTestsJava14.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc196/SanityTestsJava14.java @@ -14,7 +14,7 @@ import junit.framework.Test; /* * Some very trivial tests that help verify things are OK. - * These are a copy of the earlier Sanity Tests created for 1.6 but these supply the -10 option + * These are a copy of the earlier Sanity Tests created for 1.6 but these supply the -14 option * to check code generation and modification with that version specified. * * @author Andy Clement 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 9aaed7eb8..fe767e639 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc197/AllTestsAspectJ197.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc197/AllTestsAspectJ197.java @@ -25,9 +25,12 @@ public class AllTestsAspectJ197 { 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()) { suite.addTest(Java16PreviewFeaturesTests.suite()); } + */ return suite; } } diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc197/SanityTestsJava15.java b/tests/src/test/java/org/aspectj/systemtest/ajc197/SanityTestsJava15.java index a91d5c240..9622e7364 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc197/SanityTestsJava15.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc197/SanityTestsJava15.java @@ -13,7 +13,7 @@ import org.aspectj.testing.XMLBasedAjcTestCaseForJava15OrLater; /* * Some very trivial tests that help verify things are OK. - * These are a copy of the earlier Sanity Tests created for 1.6 but these supply the -10 option + * These are a copy of the earlier Sanity Tests created for 1.6 but these supply the -15 option * to check code generation and modification with that version specified. * * @author Alexander Kriegisch 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 ab28b080f..52950b4dd 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc197/SanityTestsJava16.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc197/SanityTestsJava16.java @@ -13,7 +13,7 @@ import org.aspectj.testing.XMLBasedAjcTestCaseForJava16OrLater; /* * Some very trivial tests that help verify things are OK. - * These are a copy of the earlier Sanity Tests created for 1.6 but these supply the -10 option + * These are a copy of the earlier Sanity Tests created for 1.6 but these supply the -16 option * to check code generation and modification with that version specified. * * @author Alexander Kriegisch 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 d99042a3f..69ed09593 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc198/AllTestsAspectJ198.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc198/AllTestsAspectJ198.java @@ -19,7 +19,7 @@ public class AllTestsAspectJ198 { public static Test suite() { TestSuite suite = new TestSuite("AspectJ 1.9.8 tests"); if (LangUtil.is9VMOrGreater()) { - suite.addTest(org.aspectj.systemtest.ajc198.CompileWithReleaseTests.suite()); + suite.addTest(CompileWithReleaseTests.suite()); } if (LangUtil.is17VMOrGreater()) { suite.addTest(SanityTestsJava17.suite()); diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc198/SanityTestsJava17.java b/tests/src/test/java/org/aspectj/systemtest/ajc198/SanityTestsJava17.java index 4fac5f375..0769be83b 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc198/SanityTestsJava17.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc198/SanityTestsJava17.java @@ -13,7 +13,7 @@ import org.aspectj.testing.XMLBasedAjcTestCaseForJava17OrLater; /* * Some very trivial tests that help verify things are OK. - * These are a copy of the earlier Sanity Tests created for 1.6 but these supply the -10 option + * These are a copy of the earlier Sanity Tests created for 1.6 but these supply the -17 option * to check code generation and modification with that version specified. * * @author Alexander Kriegisch -- 2.39.5