From 27cd3e53aae4d3364eb089abfb1d5e1739e785fc Mon Sep 17 00:00:00 2001 From: Rawi01 Date: Sun, 17 Dec 2023 13:35:55 +0100 Subject: [PATCH] Rework test to avoid diverging eclipse output If a record is part of a class some eclipse/ecj versions add the implicit static modifier to the output and some doesn't. If the record is nested in another record this doesn't happen. --- .../resource/after-delombok/WithOnNestedRecord.java | 2 +- test/transform/resource/after-ecj/WithOnNestedRecord.java | 5 +---- test/transform/resource/before/WithOnNestedRecord.java | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/test/transform/resource/after-delombok/WithOnNestedRecord.java b/test/transform/resource/after-delombok/WithOnNestedRecord.java index 86c31ac6..89a75478 100644 --- a/test/transform/resource/after-delombok/WithOnNestedRecord.java +++ b/test/transform/resource/after-delombok/WithOnNestedRecord.java @@ -1,5 +1,5 @@ // version 14: -public class WithOnNestedRecord { +public record WithOnNestedRecord() { public record Nested(String a, String b) { /** diff --git a/test/transform/resource/after-ecj/WithOnNestedRecord.java b/test/transform/resource/after-ecj/WithOnNestedRecord.java index 6c68960b..a83ac94c 100644 --- a/test/transform/resource/after-ecj/WithOnNestedRecord.java +++ b/test/transform/resource/after-ecj/WithOnNestedRecord.java @@ -1,5 +1,5 @@ import lombok.With; -public class WithOnNestedRecord { +public record WithOnNestedRecord() { public @With record Nested(String a, String b) { /* Implicit */ private final String a; /* Implicit */ private final String b; @@ -17,7 +17,4 @@ public class WithOnNestedRecord { return ((this.b == b) ? this : new WithOnNestedRecord.Nested(this.a, b)); } } - public WithOnNestedRecord() { - super(); - } } diff --git a/test/transform/resource/before/WithOnNestedRecord.java b/test/transform/resource/before/WithOnNestedRecord.java index 8dc29202..d8d28f35 100644 --- a/test/transform/resource/before/WithOnNestedRecord.java +++ b/test/transform/resource/before/WithOnNestedRecord.java @@ -1,7 +1,7 @@ // version 14: import lombok.With; -public class WithOnNestedRecord { +public record WithOnNestedRecord() { @With public record Nested(String a, String b) {