From c646def5791e3a5c27cf77c373e5ce40017c165c Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Sun, 29 Nov 2009 17:23:19 +0100 Subject: [PATCH] 'ant test' will now run the lombok unit tests. --- build.xml | 4 + buildScripts/test.ant.xml | 79 +++++++++++++++++++ test/core/src/lombok/DirectoryRunner.java | 2 +- ...Delombok.java => RunTestsViaDelombok.java} | 2 +- .../src/lombok/delombok/TestLombokFiles.java | 4 +- 5 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 buildScripts/test.ant.xml rename test/core/src/lombok/{TestViaDelombok.java => RunTestsViaDelombok.java} (99%) diff --git a/build.xml b/build.xml index 5fead285..006a546b 100644 --- a/build.xml +++ b/build.xml @@ -75,6 +75,10 @@ the common tasks and can be called on to run the main aspects of all the sub-scr + + + + diff --git a/buildScripts/test.ant.xml b/buildScripts/test.ant.xml new file mode 100644 index 00000000..742819c5 --- /dev/null +++ b/buildScripts/test.ant.xml @@ -0,0 +1,79 @@ + + + +This buildfile is part of projectlombok.org. It responsible for running unit tests. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + All tests successful. + + diff --git a/test/core/src/lombok/DirectoryRunner.java b/test/core/src/lombok/DirectoryRunner.java index 40b21aa0..1c8cfb2e 100644 --- a/test/core/src/lombok/DirectoryRunner.java +++ b/test/core/src/lombok/DirectoryRunner.java @@ -82,7 +82,7 @@ public class DirectoryRunner extends Runner { if (mustIgnore(file)) { return false; } - TestViaDelombok.compareFile(afterDirectory, file); + RunTestsViaDelombok.compareFile(afterDirectory, file); return true; } diff --git a/test/core/src/lombok/TestViaDelombok.java b/test/core/src/lombok/RunTestsViaDelombok.java similarity index 99% rename from test/core/src/lombok/TestViaDelombok.java rename to test/core/src/lombok/RunTestsViaDelombok.java index 63a8e1f8..f2aedfa3 100644 --- a/test/core/src/lombok/TestViaDelombok.java +++ b/test/core/src/lombok/RunTestsViaDelombok.java @@ -33,7 +33,7 @@ import java.util.List; import lombok.delombok.Delombok; -public class TestViaDelombok { +public class RunTestsViaDelombok { private static Delombok delombok = new Delombok(); private static volatile boolean printErrors = false; diff --git a/test/delombok/src/lombok/delombok/TestLombokFiles.java b/test/delombok/src/lombok/delombok/TestLombokFiles.java index 66e3580e..12c16d76 100644 --- a/test/delombok/src/lombok/delombok/TestLombokFiles.java +++ b/test/delombok/src/lombok/delombok/TestLombokFiles.java @@ -24,7 +24,7 @@ package lombok.delombok; import java.io.File; import lombok.DirectoryRunner; -import lombok.TestViaDelombok; +import lombok.RunTestsViaDelombok; import org.junit.runner.RunWith; @@ -32,7 +32,7 @@ import org.junit.runner.RunWith; public class TestLombokFiles { public static File getBeforeDirectory() { - TestViaDelombok.printErrors(true); + RunTestsViaDelombok.printErrors(true); return new File("test/lombok/resource/before"); }