diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2023-01-11 23:52:27 +0100 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2023-01-12 00:40:03 +0100 |
commit | a6f34d0a157eaf9a71ab1dc58024e9742dc913e3 (patch) | |
tree | 7e2fa00772a71d3ee9c0f942726826f52238c577 | |
parent | fd0530f4e9591fb1e38d56669d9e777c8efcbac5 (diff) | |
download | lombok-a6f34d0a157eaf9a71ab1dc58024e9742dc913e3.tar.gz lombok-a6f34d0a157eaf9a71ab1dc58024e9742dc913e3.tar.bz2 lombok-a6f34d0a157eaf9a71ab1dc58024e9742dc913e3.zip |
[tests] Added `ant test.ecj19` and updated tests
Tests updated because ecj finally fixed their pretty printer for records, yay!
-rw-r--r-- | buildScripts/ivy.xml | 2 | ||||
-rw-r--r-- | buildScripts/tests.ant.xml | 69 | ||||
-rw-r--r-- | test/transform/resource/after-ecj/LoggerFloggerRecord.java | 4 | ||||
-rw-r--r-- | test/transform/resource/after-ecj/NonNullOnRecord3.java | 6 |
4 files changed, 42 insertions, 39 deletions
diff --git a/buildScripts/ivy.xml b/buildScripts/ivy.xml index 61c94167..ef19eb4a 100644 --- a/buildScripts/ivy.xml +++ b/buildScripts/ivy.xml @@ -29,6 +29,7 @@ <conf name="ecj11" /> <conf name="ecj14" /> <conf name="ecj16" /> + <conf name="ecj19" /> <conf name="eclipse-oxygen" /> <conf name="eclipse-202006" /> @@ -77,6 +78,7 @@ <!-- ecjs --> + <dependency org="org.eclipse.jdt" name="ecj" rev="3.32.0" conf="ecj19->master" /> <dependency org="org.eclipse.jdt" name="ecj" rev="3.25.0" conf="ecj16->master" /> <dependency org="org.eclipse.jdt" name="ecj" rev="3.22.0.v20200530-2032" conf="ecj14->master" /> <dependency org="org.eclipse.jdt" name="ecj" rev="3.16.0" conf="ecj11->master" /> diff --git a/buildScripts/tests.ant.xml b/buildScripts/tests.ant.xml index f93523e4..a485ce51 100644 --- a/buildScripts/tests.ant.xml +++ b/buildScripts/tests.ant.xml @@ -208,6 +208,38 @@ This buildfile is part of projectlombok.org. It takes care of compiling and runn <test.eclipse-X version="202006" compiler.compliance.level="8" /> </target> + <macrodef name="test.eclipse-X-full"> + <attribute name="version" /> + <sequential> + <path id="cp.eclipse-@{version}"> + <fileset dir="testenv/eclipse-@{version}/plugins"> + <include name="*.jar" /> + </fileset> + </path> + <echo>Running EclipseTests on eclipse-@{version} on JVM${ant.java.version}</echo> + <junit haltonfailure="yes" fork="true" forkmode="once"> + <formatter classname="lombok.ant.SimpleTestFormatter" usefile="false" unless="tests.quiet" /> + <jvmarg value="-javaagent:dist/lombok.jar" /> + <jvmarg value="-Dlombok.testenv=testenv/eclipse-@{version}" /> + <classpath refid="cp.eclipse-@{version}" /> + <classpath location="build/ant" /> + <classpath refid="cp.test" /> + <classpath refid="cp.eclipse-@{version}" /> + <classpath refid="packing.basedirs.path" /> + <classpath location="build/tests" /> + <test name="lombok.eclipse.EclipseTests" /> + </junit> + </sequential> + </macrodef> + + <target name="test.eclipse-oxygen-full" depends="test.formatter.compile, test.eclipse.compile, deps.eclipse.oxygen" description="runs the full eclipse tests on your default VM, testing the oxygen release of eclipse"> + <test.eclipse-X-full version="oxygen" /> + </target> + + <target name="test.eclipse-2022-03-full" depends="test.formatter.compile, test.eclipse.compile, deps.eclipse.2022-03" description="runs the full eclipse tests on your default VM, testing the 2022-03 release of eclipse"> + <test.eclipse-X-full version="2022-03" /> + </target> + <macrodef name="test.ecj-X"> <attribute name="version" /> <sequential> @@ -234,46 +266,19 @@ This buildfile is part of projectlombok.org. It takes care of compiling and runn <test.ecj-X version="11" /> </target> - <target name="test.ecj14" depends="test.formatter.compile, test.compile" description="runs the tests on your default VM, testing the ecj11 release"> + <target name="test.ecj14" depends="test.formatter.compile, test.compile" description="runs the tests on your default VM, testing the ecj14 release"> <fetchdep.ecj version="14" /> <test.ecj-X version="14" /> </target> - <target name="test.ecj16" depends="test.formatter.compile, test.compile" description="runs the tests on your default VM, testing the ecj11 release"> + <target name="test.ecj16" depends="test.formatter.compile, test.compile" description="runs the tests on your default VM, testing the ecj16 release"> <fetchdep.ecj version="16" /> <test.ecj-X version="16" /> </target> - <macrodef name="test.eclipse-X-full"> - <attribute name="version" /> - <sequential> - <path id="cp.eclipse-@{version}"> - <fileset dir="testenv/eclipse-@{version}/plugins"> - <include name="*.jar" /> - </fileset> - </path> - <echo>Running EclipseTests on eclipse-@{version} on JVM${ant.java.version}</echo> - <junit haltonfailure="yes" fork="true" forkmode="once"> - <formatter classname="lombok.ant.SimpleTestFormatter" usefile="false" unless="tests.quiet" /> - <jvmarg value="-javaagent:dist/lombok.jar" /> - <jvmarg value="-Dlombok.testenv=testenv/eclipse-@{version}" /> - <classpath refid="cp.eclipse-@{version}" /> - <classpath location="build/ant" /> - <classpath refid="cp.test" /> - <classpath refid="cp.eclipse-@{version}" /> - <classpath refid="packing.basedirs.path" /> - <classpath location="build/tests" /> - <test name="lombok.eclipse.EclipseTests" /> - </junit> - </sequential> - </macrodef> - - <target name="test.eclipse-oxygen-full" depends="test.formatter.compile, test.eclipse.compile, deps.eclipse.oxygen" description="runs the full eclipse tests on your default VM, testing the oxygen release of eclipse"> - <test.eclipse-X-full version="oxygen" /> - </target> - - <target name="test.eclipse-2022-03-full" depends="test.formatter.compile, test.eclipse.compile, deps.eclipse.2022-03" description="runs the full eclipse tests on your default VM, testing the 2022-03 release of eclipse"> - <test.eclipse-X-full version="2022-03" /> + <target name="test.ecj19" depends="test.formatter.compile, test.compile" description="runs the tests on your default VM, testing the ecj19 release"> + <fetchdep.ecj version="19" /> + <test.ecj-X version="19" /> </target> <target name="test" depends="test.javacCurrent, test.eclipse-202006" description="runs the tests against the default JVM, javac, and eclipse" /> diff --git a/test/transform/resource/after-ecj/LoggerFloggerRecord.java b/test/transform/resource/after-ecj/LoggerFloggerRecord.java index 85ff1641..fde69e74 100644 --- a/test/transform/resource/after-ecj/LoggerFloggerRecord.java +++ b/test/transform/resource/after-ecj/LoggerFloggerRecord.java @@ -1,7 +1,7 @@ -// version 14: +// version 19: import lombok.extern.flogger.Flogger; class LoggerFloggerRecord { - public static @Flogger record Inner(com log) { + public @Flogger record Inner(com log) { private static final com.google.common.flogger.FluentLogger log = com.google.common.flogger.FluentLogger.forEnclosingClass(); /* Implicit */ private final String x; <clinit>() { diff --git a/test/transform/resource/after-ecj/NonNullOnRecord3.java b/test/transform/resource/after-ecj/NonNullOnRecord3.java index 44c00098..37f0afcf 100644 --- a/test/transform/resource/after-ecj/NonNullOnRecord3.java +++ b/test/transform/resource/after-ecj/NonNullOnRecord3.java @@ -1,13 +1,9 @@ -// version 14: +// version 19: import lombok.NonNull; public record NonNullOnRecord3(String a) { /* Implicit */ private final String a; public NonNullOnRecord3(String a) { super(); - .a = a; - } - public NonNullOnRecord3(String a) { - super(); this.a = a; } public void method(@NonNull String param) { |