aboutsummaryrefslogtreecommitdiff
path: root/test/core/src/lombok/AbstractRunTests.java
diff options
context:
space:
mode:
authorJan Rieke <rieke@subshell.com>2017-03-13 16:49:20 +0100
committerJan Rieke <rieke@subshell.com>2017-03-13 16:49:20 +0100
commit2346b15c8d2809b6efa9fc94f4f6cc56dcaa54b8 (patch)
tree238b9877ce1daa83b3e8d422eb4d2f7ab89f3864 /test/core/src/lombok/AbstractRunTests.java
parentf51bbce3e396a0151bc0242d00e250f2bc720316 (diff)
parenta2c10c70fa8e2c8736464a5c3d445e2ca6e8a296 (diff)
downloadlombok-2346b15c8d2809b6efa9fc94f4f6cc56dcaa54b8.tar.gz
lombok-2346b15c8d2809b6efa9fc94f4f6cc56dcaa54b8.tar.bz2
lombok-2346b15c8d2809b6efa9fc94f4f6cc56dcaa54b8.zip
Merge remote-tracking branch 'upstream/master'
# Conflicts: # src/core/lombok/eclipse/handlers/HandleBuilder.java # src/core/lombok/eclipse/handlers/HandleConstructor.java # src/core/lombok/javac/handlers/HandleBuilder.java # src/core/lombok/javac/handlers/HandleConstructor.java
Diffstat (limited to 'test/core/src/lombok/AbstractRunTests.java')
-rw-r--r--test/core/src/lombok/AbstractRunTests.java23
1 files changed, 4 insertions, 19 deletions
diff --git a/test/core/src/lombok/AbstractRunTests.java b/test/core/src/lombok/AbstractRunTests.java
index d044a39f..1a454585 100644
--- a/test/core/src/lombok/AbstractRunTests.java
+++ b/test/core/src/lombok/AbstractRunTests.java
@@ -55,15 +55,15 @@ 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, String platform, int version) throws IOException {
ConfigurationKeysLoader.LoaderLoader.loadAllConfigurationKeys();
AssertionError directiveFailure = null;
LombokTestSource sourceDirectives = null;
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) {
directiveFailure = ae;
}
@@ -73,6 +73,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;
@@ -98,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 {