summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorGeorge Fraser <george@fivetran.com>2018-09-21 21:49:12 -0700
committerGeorge Fraser <george@fivetran.com>2018-09-21 21:49:12 -0700
commitedf4cecbb081e04ad5ed95523e777f2249ced622 (patch)
treeb7e51ff5faaadd7517987d6f4642bb1f9e74c927 /src/test
parent8a6c6213e7cadc4a83ad893ce8fc0f661e0ba9ad (diff)
downloadjava-language-server-edf4cecbb081e04ad5ed95523e777f2249ced622.zip
Fix incomplete annotation in inner class
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/javacs/CompletionsTest.java8
-rw-r--r--src/test/test-project/workspace/src/org/javacs/example/AnnotationInInnerClass.java9
2 files changed, 17 insertions, 0 deletions
diff --git a/src/test/java/org/javacs/CompletionsTest.java b/src/test/java/org/javacs/CompletionsTest.java
index 4370c93..52b1921 100644
--- a/src/test/java/org/javacs/CompletionsTest.java
+++ b/src/test/java/org/javacs/CompletionsTest.java
@@ -768,4 +768,12 @@ public class CompletionsTest extends CompletionsBase {
assertThat(suggestions, hasItem(startsWith("class AutocompleteClassName")));
}
+
+ @Test
+ public void annotationInInnerClass() {
+ var file = "/org/javacs/example/AnnotationInInnerClass.java";
+ var suggestions = insertText(file, 6, 17);
+
+ assertThat(suggestions, hasItem(startsWith("Override")));
+ }
}
diff --git a/src/test/test-project/workspace/src/org/javacs/example/AnnotationInInnerClass.java b/src/test/test-project/workspace/src/org/javacs/example/AnnotationInInnerClass.java
new file mode 100644
index 0000000..bbf33c6
--- /dev/null
+++ b/src/test/test-project/workspace/src/org/javacs/example/AnnotationInInnerClass.java
@@ -0,0 +1,9 @@
+package org.javacs.example;
+
+class AnnotationInInnerClass {
+ void test() {
+ class Inner {
+ @Ove
+ }
+ }
+} \ No newline at end of file