aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/indent/java/annotation.java3
-rw-r--r--tests/indent/java/annotation_2.java8
-rw-r--r--tests/indent/java_spec.lua2
3 files changed, 13 insertions, 0 deletions
diff --git a/tests/indent/java/annotation.java b/tests/indent/java/annotation.java
new file mode 100644
index 000000000..bd37d09a7
--- /dev/null
+++ b/tests/indent/java/annotation.java
@@ -0,0 +1,3 @@
+abstract public @interface Foo {
+ abstract public String Bar();
+}
diff --git a/tests/indent/java/annotation_2.java b/tests/indent/java/annotation_2.java
new file mode 100644
index 000000000..aa5f45994
--- /dev/null
+++ b/tests/indent/java/annotation_2.java
@@ -0,0 +1,8 @@
+@ContextConfiguration(
+ classes = {
+ WireMockConfig.class,
+ }
+)
+public class Foo {
+
+}
diff --git a/tests/indent/java_spec.lua b/tests/indent/java_spec.lua
index 33003fd40..1d10046bb 100644
--- a/tests/indent/java_spec.lua
+++ b/tests/indent/java_spec.lua
@@ -33,5 +33,7 @@ describe("indent Java:", function()
run:new_line("method_chaining.java", { on_line = 4, text = '.append("b");', indent = 6 })
run:new_line("constructor_with_arguments_on_multiple_lines.java", { on_line = 4, text = "}", indent = 2 })
run:new_line("method_with_arguments_on_multiple_lines.java", { on_line = 4, text = "}", indent = 2 })
+ run:new_line("annotation.java", { on_line = 1, text = "abstract public Foo(){}", indent = 2 })
+ run:new_line("annotation_2.java", { on_line = 2, text = "Bar.class", indent = 4 })
end)
end)