These tests need a Java 14 level AspectJ compiler, because they use
version-specific preview features. This compiler has been upgraded
to a Java 15 compliant JDT Core already, i.e. it does not support
preview features of a previous version anymore.
An error message similar to the above explanation will appear when
trying to run any XMLBasedAjcTestCaseForJava14Only subclass, such as
Ajc196PreviewFeaturesTests (currently the only one).
When running AllTestsAspectJ196, Ajc196PreviewFeaturesTests will not be
added to the test suite anymore.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
@Override
public void runTest(String title) {
+ 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."
+ );
+ /*
if (!LangUtil.is14VMOrGreater() || LangUtil.is15VMOrGreater()) {
throw new IllegalStateException(
"These tests should be run on Java 14 only " +
);
}
super.runTest(title);
+ */
}
}
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()) {
suite.addTest(Ajc196PreviewFeaturesTests.suite());
}
+*/
return suite;
}
}