aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.xml13
-rw-r--r--test/ecj/.gitignore1
-rw-r--r--test/ecj/SimpleTest.java10
3 files changed, 23 insertions, 1 deletions
diff --git a/build.xml b/build.xml
index 8063b1f9..eaf09d1c 100644
--- a/build.xml
+++ b/build.xml
@@ -307,7 +307,18 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
</copy>
</target>
- <target name="test" depends="-test-compile, dist" unless="tests.skip" description="Runs the tests.">
+ <target name="test-ecj" depends="dist, contrib" unless="tests.skip">
+ <java jar="lib/ecj/ecj.jar" fork="true" failonerror="true">
+ <jvmarg value="-javaagent:dist/lombok.jar=ecj" />
+ <arg value="-source" />
+ <arg value="1.6" />
+ <arg value="-target" />
+ <arg value="1.6" />
+ <arg value="test/ecj/SimpleTest.java" />
+ </java>
+ </target>
+
+ <target name="test" depends="-test-compile, dist, test-ecj" unless="tests.skip" description="Runs the tests.">
<junit haltonfailure="yes" fork="on">
<jvmarg value="-javaagent:dist/lombok.jar" />
<formatter type="plain" usefile="false" unless="tests.quiet" />
diff --git a/test/ecj/.gitignore b/test/ecj/.gitignore
new file mode 100644
index 00000000..5241a722
--- /dev/null
+++ b/test/ecj/.gitignore
@@ -0,0 +1 @@
+*.class \ No newline at end of file
diff --git a/test/ecj/SimpleTest.java b/test/ecj/SimpleTest.java
new file mode 100644
index 00000000..56c2a211
--- /dev/null
+++ b/test/ecj/SimpleTest.java
@@ -0,0 +1,10 @@
+@lombok.Data
+public class SimpleTest {
+ private final String test;
+ private final int foo;
+
+ public String bar() {
+ int val = getFoo() + 5;
+ return new SimpleTest("", 0).toString() + val;
+ }
+}