diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2014-02-10 21:56:35 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2014-02-10 21:56:35 +0100 |
commit | d78135180c8f9e9f4c6c361679759d3eacb63be3 (patch) | |
tree | 6450085e10d9dfd9dc901d8cc837727d7372bf09 /test/core/src/lombok | |
parent | db24fd42c5732856a894dbdc5e1827ea31792757 (diff) | |
download | lombok-d78135180c8f9e9f4c6c361679759d3eacb63be3.tar.gz lombok-d78135180c8f9e9f4c6c361679759d3eacb63be3.tar.bz2 lombok-d78135180c8f9e9f4c6c361679759d3eacb63be3.zip |
[deps] Updated eclipse deps to 3.9 tree. This also enables testing java7 features on ecj.
[Log] updated naming for @Log (topic= instead of mchmulder's 'value').
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 | 3 |
2 files changed, 13 insertions, 3 deletions
diff --git a/test/core/src/lombok/AbstractRunTests.java b/test/core/src/lombok/AbstractRunTests.java index 2f3f0988..e84aec0d 100644 --- a/test/core/src/lombok/AbstractRunTests.java +++ b/test/core/src/lombok/AbstractRunTests.java @@ -225,8 +225,8 @@ public abstract class AbstractRunTests { actualLines = removeBlanks(actualLines); int size = Math.min(expectedLines.length, actualLines.length); 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) { @@ -237,6 +237,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 586c124a..4f3e2794 100644 --- a/test/core/src/lombok/RunTestsViaEcj.java +++ b/test/core/src/lombok/RunTestsViaEcj.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2013 The Project Lombok Authors. + * Copyright (C) 2010-2014 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -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; } |