mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 00:16:47 +00:00
fixded the version mess in the test framework.
This commit is contained in:
1 parent
eb91f71e83
commit
8bfbd7fa84
1 file changed
-18
@@ -62,8 +62,6 @@ public abstract class AbstractRunTests {
|
||||
try {
|
||||
sourceDirectives = LombokTestSource.readDirectives(file);
|
||||
if (sourceDirectives.isIgnore()) return null;
|
||||
if (!sourceDirectives.versionWithinLimit(params.getVersion())) return null;
|
||||
if (!sourceDirectives.versionWithinLimit(getClasspathVersion())) return null;
|
||||
if (!sourceDirectives.versionWithinLimit(version)) return null;
|
||||
if (!sourceDirectives.runOnPlatform(platform)) return null;
|
||||
} catch (AssertionError ae) {
|
||||
@@ -101,22 +99,6 @@ public abstract class AbstractRunTests {
|
||||
};
|
||||
}
|
||||
|
||||
private static int getClasspathVersion() {
|
||||
try {
|
||||
Class.forName("java.lang.AutoCloseable");
|
||||
} catch (ClassNotFoundException e) {
|
||||
return 6;
|
||||
}
|
||||
|
||||
try {
|
||||
Class.forName("java.util.stream.Stream");
|
||||
} catch (ClassNotFoundException e) {
|
||||
return 7;
|
||||
}
|
||||
|
||||
return 8;
|
||||
}
|
||||
|
||||
protected abstract boolean transformCode(Collection<CompilerMessage> messages, StringWriter result, File file, String encoding, Map<String, String> formatPreferences) throws Throwable;
|
||||
|
||||
protected String readFile(File file) throws IOException {
|
||||
|
||||
Reference in new issue
Block a user