diff options
9 files changed, 64 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/ValInBasicFor.java b/test/transform/resource/after-delombok/ValInBasicFor.java new file mode 100644 index 00000000..e21450e1 --- /dev/null +++ b/test/transform/resource/after-delombok/ValInBasicFor.java @@ -0,0 +1,9 @@ +import lombok.val; +public class ValInBasicFor { + public void basicFor() { + java.util.List<String> list = java.util.Arrays.asList("Hello, World!"); + for (val shouldBe = 1, marked = "", error = 1.0; ; ) { + System.out.println(""); + } + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/ValInMultiDeclaration.java b/test/transform/resource/after-delombok/ValInMultiDeclaration.java new file mode 100644 index 00000000..32f689c7 --- /dev/null +++ b/test/transform/resource/after-delombok/ValInMultiDeclaration.java @@ -0,0 +1,6 @@ +public class ValInMultiDeclaration { + public void test() { + final int x = 10; + final java.lang.String y = ""; + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/ValInBasicFor.java b/test/transform/resource/after-ecj/ValInBasicFor.java new file mode 100644 index 00000000..42e0a3c5 --- /dev/null +++ b/test/transform/resource/after-ecj/ValInBasicFor.java @@ -0,0 +1,13 @@ +import lombok.val; +public class ValInBasicFor { + public ValInBasicFor() { + super(); + } + public void basicFor() { + java.util.List<String> list = java.util.Arrays.asList("Hello, World!"); + for (val shouldBe = 1;, val marked = "";, val error = 1.0;; ; ) + { + System.out.println(""); + } + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/ValInMultiDeclaration.java b/test/transform/resource/after-ecj/ValInMultiDeclaration.java new file mode 100644 index 00000000..5441f6fe --- /dev/null +++ b/test/transform/resource/after-ecj/ValInMultiDeclaration.java @@ -0,0 +1,10 @@ +import lombok.val; +public class ValInMultiDeclaration { + public ValInMultiDeclaration() { + super(); + } + public void test() { + final @val int x = 10; + final @val java.lang.String y = ""; + } +} diff --git a/test/transform/resource/before/ValInBasicFor.java b/test/transform/resource/before/ValInBasicFor.java new file mode 100644 index 00000000..1f132b8f --- /dev/null +++ b/test/transform/resource/before/ValInBasicFor.java @@ -0,0 +1,10 @@ +import lombok.val; + +public class ValInBasicFor { + public void basicFor() { + java.util.List<String> list = java.util.Arrays.asList("Hello, World!"); + for (val shouldBe = 1, marked = "", error = 1.0; ; ) { + System.out.println(""); + } + } +}
\ No newline at end of file diff --git a/test/transform/resource/before/ValInMultiDeclaration.java b/test/transform/resource/before/ValInMultiDeclaration.java new file mode 100644 index 00000000..1c333ebb --- /dev/null +++ b/test/transform/resource/before/ValInMultiDeclaration.java @@ -0,0 +1,6 @@ +import lombok.val; +public class ValInMultiDeclaration { + public void test() { + val x = 10, y = ""; + } +}
\ No newline at end of file diff --git a/test/transform/resource/messages-delombok/ValInBasicFor.java.messages b/test/transform/resource/messages-delombok/ValInBasicFor.java.messages new file mode 100644 index 00000000..3f7ada73 --- /dev/null +++ b/test/transform/resource/messages-delombok/ValInBasicFor.java.messages @@ -0,0 +1,3 @@ +6:26 ERROR 'val' is not allowed in old-style for loops +6:40 ERROR 'val' is not allowed in old-style for loops +6:53 ERROR 'val' is not allowed in old-style for loops diff --git a/test/transform/resource/messages-ecj/ValInBasicFor.java.messages b/test/transform/resource/messages-ecj/ValInBasicFor.java.messages new file mode 100644 index 00000000..23ffd6fd --- /dev/null +++ b/test/transform/resource/messages-ecj/ValInBasicFor.java.messages @@ -0,0 +1,4 @@ +6 error 'val' is not allowed in old-style for loops +6 error Type mismatch: cannot convert from int to val +6 error 'val' is not allowed in old-style for loops +6 error 'val' is not allowed in old-style for loops
\ No newline at end of file diff --git a/test/transform/resource/messages-idempotent/ValInBasicFor.java.messages b/test/transform/resource/messages-idempotent/ValInBasicFor.java.messages new file mode 100644 index 00000000..133baa64 --- /dev/null +++ b/test/transform/resource/messages-idempotent/ValInBasicFor.java.messages @@ -0,0 +1,3 @@ +5:26 ERROR 'val' is not allowed in old-style for loops +5:40 ERROR 'val' is not allowed in old-style for loops +5:53 ERROR 'val' is not allowed in old-style for loops |