aboutsummaryrefslogtreecommitdiff
path: root/test/core/src/lombok
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2014-03-04 23:16:49 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2014-03-04 23:16:49 +0100
commitf956ba1e337699206052a016da65f4f02ac6825b (patch)
tree53b0c638275ebfa8a3d1133c1d389ef700460572 /test/core/src/lombok
parente5574133363c8b718329e07a73bf161416485da5 (diff)
parentfbab1ca77cb8306843e26c5bad91186b34563282 (diff)
downloadlombok-f956ba1e337699206052a016da65f4f02ac6825b.tar.gz
lombok-f956ba1e337699206052a016da65f4f02ac6825b.tar.bz2
lombok-f956ba1e337699206052a016da65f4f02ac6825b.zip
[configuration] Merge branch 'master' as we work on configuration.
* Conflict due to adding topic() feature to logger in master, and 'field name' feature in config branch. * master has since updated to shiny new eclipse dep versions and the 'ant eclipseForDebugging' feature, but this branch added deps. Addressed that. * Renamed 'loggerCategory' to 'loggerTopic'. I know, that wasn't exactly right to do in a merge, but, there you have it. * Test infrastructure changed in configuration branch, and tests had been added in master branch. Conflicts: build.xml buildScripts/ivy.xml src/core/lombok/eclipse/handlers/HandleLog.java src/core/lombok/extern/apachecommons/CommonsLog.java src/core/lombok/extern/java/Log.java src/core/lombok/extern/log4j/Log4j.java src/core/lombok/extern/log4j/Log4j2.java src/core/lombok/javac/handlers/HandleLog.java test/transform/resource/after-ecj/ValInTryWithResources.java
Diffstat (limited to 'test/core/src/lombok')
-rw-r--r--test/core/src/lombok/AbstractRunTests.java13
-rw-r--r--test/core/src/lombok/RunTestsViaEcj.java1
2 files changed, 12 insertions, 2 deletions
diff --git a/test/core/src/lombok/AbstractRunTests.java b/test/core/src/lombok/AbstractRunTests.java
index 9b256b36..34f6cbf4 100644
--- a/test/core/src/lombok/AbstractRunTests.java
+++ b/test/core/src/lombok/AbstractRunTests.java
@@ -218,8 +218,8 @@ public abstract class AbstractRunTests {
}
for (int i = 0; i < size; i++) {
- String expected = expectedLines[i];
- String actual = actualLines[i];
+ String expected = trimRight(expectedLines[i]);
+ String actual = trimRight(actualLines[i]);
assertEquals(String.format("Difference in %s on line %d", name, i + 1), expected, actual);
}
if (expectedLines.length > actualLines.length) {
@@ -230,6 +230,15 @@ public abstract class AbstractRunTests {
}
}
+ private static String trimRight(String in) {
+ int endIdx = in.length() - 1;
+ while (endIdx > -1 && Character.isWhitespace(in.charAt(endIdx))) {
+ endIdx--;
+ }
+
+ return in.substring(0, endIdx);
+ }
+
private static String[] removeBlanks(String[] in) {
List<String> out = new ArrayList<String>();
for (String s : in) {
diff --git a/test/core/src/lombok/RunTestsViaEcj.java b/test/core/src/lombok/RunTestsViaEcj.java
index 695ff0a9..2734eb43 100644
--- a/test/core/src/lombok/RunTestsViaEcj.java
+++ b/test/core/src/lombok/RunTestsViaEcj.java
@@ -70,6 +70,7 @@ 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);
options.set(warnings);
return options;
}