mirror of
https://github.com/tiennm99/lombok.git
synced 2026-09-08 18:17:49 +00:00
Fixed versionmatching for our test framework.
This commit is contained in:
@@ -55,7 +55,7 @@ public abstract class AbstractRunTests {
|
||||
this.dumpActualFilesHere = findPlaceToDumpActualFiles();
|
||||
}
|
||||
|
||||
public final FileTester createTester(final DirectoryRunner.TestParams params, final File file) throws IOException {
|
||||
public final FileTester createTester(final DirectoryRunner.TestParams params, final File file, int version) throws IOException {
|
||||
ConfigurationKeysLoader.LoaderLoader.loadAllConfigurationKeys();
|
||||
AssertionError directiveFailure = null;
|
||||
LombokTestSource sourceDirectives = null;
|
||||
@@ -64,6 +64,7 @@ public abstract class AbstractRunTests {
|
||||
if (sourceDirectives.isIgnore()) return null;
|
||||
if (!sourceDirectives.versionWithinLimit(params.getVersion())) return null;
|
||||
if (!sourceDirectives.versionWithinLimit(getClasspathVersion())) return null;
|
||||
if (!sourceDirectives.versionWithinLimit(version)) return null;
|
||||
} catch (AssertionError ae) {
|
||||
directiveFailure = ae;
|
||||
}
|
||||
@@ -73,6 +74,7 @@ public abstract class AbstractRunTests {
|
||||
|
||||
if (expected.isIgnore()) return null;
|
||||
if (!expected.versionWithinLimit(params.getVersion())) return null;
|
||||
if (!expected.versionWithinLimit(version)) return null;
|
||||
|
||||
final LombokTestSource sourceDirectives_ = sourceDirectives;
|
||||
final AssertionError directiveFailure_ = directiveFailure;
|
||||
|
||||
@@ -155,12 +155,11 @@ public class DirectoryRunner extends Runner {
|
||||
|
||||
private FileTester createTester(String fileName) throws IOException {
|
||||
File file = new File(params.getBeforeDirectory(), fileName);
|
||||
|
||||
switch (params.getCompiler()) {
|
||||
case DELOMBOK:
|
||||
return new RunTestsViaDelombok().createTester(params, file);
|
||||
return new RunTestsViaDelombok().createTester(params, file, params.getVersion());
|
||||
case ECJ:
|
||||
return new RunTestsViaEcj().createTester(params, file);
|
||||
return new RunTestsViaEcj().createTester(params, file, params.getVersion());
|
||||
default:
|
||||
case JAVAC:
|
||||
throw new UnsupportedOperationException();
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
//VERSION 7:
|
||||
class GenerateSuppressFBWarnings {
|
||||
int y;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
|
||||
Reference in New Issue
Block a user