diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/javacs/CompletionsTest.java | 8 | ||||
-rw-r--r-- | src/test/test-project/workspace/src/org/javacs/example/AutocompleteOverride.java | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/test/java/org/javacs/CompletionsTest.java b/src/test/java/org/javacs/CompletionsTest.java index 52b1921..c8f01ca 100644 --- a/src/test/java/org/javacs/CompletionsTest.java +++ b/src/test/java/org/javacs/CompletionsTest.java @@ -776,4 +776,12 @@ public class CompletionsTest extends CompletionsBase { assertThat(suggestions, hasItem(startsWith("Override"))); } + + @Test + public void overrideMethod() { + var file = "/org/javacs/example/AutocompleteOverride.java"; + var suggestions = insertText(file, 8, 15); + + assertThat(suggestions, hasItem(containsString("void superMethod() {"))); + } } diff --git a/src/test/test-project/workspace/src/org/javacs/example/AutocompleteOverride.java b/src/test/test-project/workspace/src/org/javacs/example/AutocompleteOverride.java new file mode 100644 index 0000000..8211b18 --- /dev/null +++ b/src/test/test-project/workspace/src/org/javacs/example/AutocompleteOverride.java @@ -0,0 +1,10 @@ +package org.javacs.example; + +class AutocompleteOverride { + class Super { + void superMethod() {} + } + class Sub extends Super { + @Overr + } +}
\ No newline at end of file |