diff --git a/internal/lsp/lsp_test.go b/internal/lsp/lsp_test.go index 28a2c22a5..0a48270f1 100644 --- a/internal/lsp/lsp_test.go +++ b/internal/lsp/lsp_test.go @@ -34,7 +34,7 @@ func testLSP(t *testing.T, exporter packagestest.Exporter) { // We hardcode the expected number of test cases to ensure that all tests // are being executed. If a test is added, this number must be changed. - const expectedCompletionsCount = 60 + const expectedCompletionsCount = 63 const expectedDiagnosticsCount = 13 const expectedFormatCount = 3 const expectedDefinitionsCount = 16 diff --git a/internal/lsp/testdata/func_rank/func_rank.go.in b/internal/lsp/testdata/func_rank/func_rank.go.in new file mode 100644 index 000000000..cb5a1b475 --- /dev/null +++ b/internal/lsp/testdata/func_rank/func_rank.go.in @@ -0,0 +1,12 @@ +package func_rank + +var stringAVar = "var" //@item(stringAVar, "stringAVar", "string", "var") +func stringBFunc() string { return "str" } //@item(stringBFunc, "stringBFunc()", "string", "func") +type stringer struct{} //@item(stringer, "stringer", "struct{...}", "struct") + +func _() stringer //@complete("tr", stringer, stringAVar, stringBFunc) + +func _(val stringer) {} //@complete("tr", stringer, stringAVar, stringBFunc) + +func (stringer) _() {} //@complete("tr", stringer, stringAVar, stringBFunc) +