aboutsummaryrefslogtreecommitdiff
path: root/test/core
diff options
context:
space:
mode:
Diffstat (limited to 'test/core')
-rw-r--r--test/core/src/lombok/AbstractRunTests.java9
-rw-r--r--test/core/src/lombok/RunTestsViaDelombok.java5
2 files changed, 10 insertions, 4 deletions
diff --git a/test/core/src/lombok/AbstractRunTests.java b/test/core/src/lombok/AbstractRunTests.java
index 4241646b..7d5992be 100644
--- a/test/core/src/lombok/AbstractRunTests.java
+++ b/test/core/src/lombok/AbstractRunTests.java
@@ -37,12 +37,12 @@ public abstract class AbstractRunTests {
public void compareFile(DirectoryRunner.TestParams params, File file) throws Throwable {
StringBuilder messages = new StringBuilder();
- StringWriter result = new StringWriter();
- transformCode(messages, result, file);
+ StringWriter writer = new StringWriter();
+ transformCode(messages, writer, file);
compare(
file.getName(),
readFile(params.getAfterDirectory(), file, false),
- result.toString(),
+ writer.toString(),
readFile(params.getMessagesDirectory(), file, true),
messages.toString(),
params.printErrors());
@@ -111,6 +111,9 @@ public abstract class AbstractRunTests {
private static void compareContent(String name, String expectedFile, String actualFile) {
String[] expectedLines = expectedFile.split("(\\r?\\n)");
String[] actualLines = actualFile.split("(\\r?\\n)");
+ if (expectedLines[0].startsWith("// Generated by delombok at ")) {
+ expectedLines[0] = "";
+ }
if (actualLines[0].startsWith("// Generated by delombok at ")) {
actualLines[0] = "";
}
diff --git a/test/core/src/lombok/RunTestsViaDelombok.java b/test/core/src/lombok/RunTestsViaDelombok.java
index 50fad33e..59a0ee89 100644
--- a/test/core/src/lombok/RunTestsViaDelombok.java
+++ b/test/core/src/lombok/RunTestsViaDelombok.java
@@ -51,6 +51,9 @@ public class RunTestsViaDelombok extends AbstractRunTests {
}
});
- delombok.delombok(file.getAbsolutePath(), result);
+ delombok.addFile(file.getParentFile(), file.getName());
+ delombok.setSourcepath(file.getParentFile().getAbsolutePath());
+ delombok.setWriter(result);
+ delombok.delombok();
}
}