diff options
author | George Fraser <george@fivetran.com> | 2019-01-01 23:18:00 -0800 |
---|---|---|
committer | George Fraser <george@fivetran.com> | 2019-01-01 23:18:00 -0800 |
commit | 4f1253fbefcccbc11883cf6edfcdd6e6d2399da9 (patch) | |
tree | 695b8186c93b46f76a91fc48f61626bc0324bd14 /src/test | |
parent | 09fe6882214bb530370c908edb9320b074bd0c05 (diff) | |
download | java-language-server-4f1253fbefcccbc11883cf6edfcdd6e6d2399da9.zip |
Fixes
Diffstat (limited to 'src/test')
3 files changed, 17 insertions, 1 deletions
diff --git a/src/test/java/org/javacs/CompletionsTest.java b/src/test/java/org/javacs/CompletionsTest.java index 4ae17a3..e00f6c4 100644 --- a/src/test/java/org/javacs/CompletionsTest.java +++ b/src/test/java/org/javacs/CompletionsTest.java @@ -810,6 +810,14 @@ public class CompletionsTest extends CompletionsBase { } @Test + public void stringBuilderLength() { + var file = "/org/javacs/example/CompleteStringBuilderLength.java"; + var suggestions = insertText(file, 6, 12); + + assertThat(suggestions, hasItem(containsString("length"))); + } + + @Test public void implementsKeyword() { var file = "/org/javacs/example/AutocompleteImplements.java"; var suggestions = insertText(file, 3, 34); diff --git a/src/test/test-project/workspace/src/org/javacs/example/CodeLensPlacement.java b/src/test/test-project/workspace/src/org/javacs/example/CodeLensPlacement.java index d58bd67..5d08d0e 100644 --- a/src/test/test-project/workspace/src/org/javacs/example/CodeLensPlacement.java +++ b/src/test/test-project/workspace/src/org/javacs/example/CodeLensPlacement.java @@ -4,6 +4,6 @@ package org.javacs.example; public class CodeLensPlacement { @Deprecated(since = "The presence of the word main screws up positioning") void main() { - + } }
\ No newline at end of file diff --git a/src/test/test-project/workspace/src/org/javacs/example/CompleteStringBuilderLength.java b/src/test/test-project/workspace/src/org/javacs/example/CompleteStringBuilderLength.java new file mode 100644 index 0000000..129b30d --- /dev/null +++ b/src/test/test-project/workspace/src/org/javacs/example/CompleteStringBuilderLength.java @@ -0,0 +1,8 @@ +package org.javacs.example; + +class CompleteStringBuilderLength { + public int main() { + var s = new StringBuilder(); + s.l + } +}
\ No newline at end of file |