aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2014-05-04 10:33:55 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2014-05-04 10:33:55 +0200
commit7079271802176caea4404fc7c80b4656346a2402 (patch)
tree18053476d31bce4d655dc4ff807067ae01772537 /test
parente890428077e48f8dcf14928267d506a0c1d36abf (diff)
downloadlombok-7079271802176caea4404fc7c80b4656346a2402.tar.gz
lombok-7079271802176caea4404fc7c80b4656346a2402.tar.bz2
lombok-7079271802176caea4404fc7c80b4656346a2402.zip
thoroughly updated the launch targets for testing lombok in eclipse;
they should now be able to handle running JDK8 etc tests. CAREFUL: You MUST name your JDK8 'JavaSE-1.8' or it won't work. Also added a basic test for JDK8 features.
Diffstat (limited to 'test')
-rw-r--r--test/core/src/lombok/RunTestsViaEcj.java11
-rw-r--r--test/transform/resource/after-delombok/ValInTryWithResources.java1
-rw-r--r--test/transform/resource/before/ValInTryWithResources.java2
3 files changed, 7 insertions, 7 deletions
diff --git a/test/core/src/lombok/RunTestsViaEcj.java b/test/core/src/lombok/RunTestsViaEcj.java
index 8d1a8278..e23ebc4c 100644
--- a/test/core/src/lombok/RunTestsViaEcj.java
+++ b/test/core/src/lombok/RunTestsViaEcj.java
@@ -70,22 +70,22 @@ public class RunTestsViaEcj extends AbstractRunTests {
warnings.put(CompilerOptions.OPTION_ReportUnusedLabel, "ignore");
warnings.put(CompilerOptions.OPTION_ReportUnusedImport, "ignore");
warnings.put(CompilerOptions.OPTION_ReportUnusedPrivateMember, "ignore");
- warnings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_7);
+ warnings.put(CompilerOptions.OPTION_Source, "1." + Eclipse.getEcjCompilerVersion());
options.set(warnings);
return options;
}
protected IErrorHandlingPolicy ecjErrorHandlingPolicy() {
return new IErrorHandlingPolicy() {
- @Override public boolean stopOnFirstError() {
+ public boolean stopOnFirstError() {
return true;
}
- @Override public boolean proceedOnErrors() {
+ public boolean proceedOnErrors() {
return false;
}
- @Override public boolean ignoreAllErrors() {
+ public boolean ignoreAllErrors() {
return false;
}
};
@@ -124,7 +124,8 @@ public class RunTestsViaEcj extends AbstractRunTests {
CompilationUnitDeclaration cud = compilationUnit_.get();
- result.append(cud.toString());
+ if (cud == null) result.append("---- NO CompilationUnit provided by ecj ----");
+ else result.append(cud.toString());
}
private FileSystem createFileSystem(File file) {
diff --git a/test/transform/resource/after-delombok/ValInTryWithResources.java b/test/transform/resource/after-delombok/ValInTryWithResources.java
index 9aae99a2..42bd3193 100644
--- a/test/transform/resource/after-delombok/ValInTryWithResources.java
+++ b/test/transform/resource/after-delombok/ValInTryWithResources.java
@@ -1,4 +1,3 @@
-//version 7
import java.io.IOException;
public class ValInTryWithResources {
public void whyTryInsteadOfCleanup() throws IOException {
diff --git a/test/transform/resource/before/ValInTryWithResources.java b/test/transform/resource/before/ValInTryWithResources.java
index 780e1c71..a7820062 100644
--- a/test/transform/resource/before/ValInTryWithResources.java
+++ b/test/transform/resource/before/ValInTryWithResources.java
@@ -1,4 +1,4 @@
-//version 7
+//version 7:
import lombok.val;
import java.io.IOException;