diff options
Diffstat (limited to 'test/core/src/lombok')
-rw-r--r-- | test/core/src/lombok/AbstractRunTests.java | 13 | ||||
-rw-r--r-- | test/core/src/lombok/RunTestsViaEcj.java | 1 |
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; } |