x/tools/internal/lsp: re-enable a test with adjusted error message

This is a follow-up on CL 425497. Must be submitted after CL 425007.

For golang/go#54511.

Change-Id: Ice9c1c62b911efa8efa20ea295bf313aabe8c5bb
Reviewed-on: https://go-review.googlesource.com/c/tools/+/425594
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
Robert Griesemer 2022-08-25 11:52:14 -07:00
Родитель 550e1f5a55
Коммит 49ab44de90
3 изменённых файлов: 6 добавлений и 13 удалений

11
internal/lsp/testdata/badstmt/badstmt.go.in поставляемый
Просмотреть файл

@ -5,16 +5,9 @@ import (
)
func _() {
/*
Temporarily disabled so we can change the parser error message
TODO(gri) uncomment once CL 425007 is submitted, and remove spaces
between // and @.
defer foo.F // @complete(" //", Foo),diag(" //", "syntax", "function must be invoked in defer statement", "error")
defer foo.F //@complete(" //", Foo),diag(" //", "syntax", "function must be invoked in defer statement|expression in defer must be function call", "error")
y := 1
defer foo.F // @complete(" //", Foo)
*/
defer foo.F //@complete(" //", Foo)
}
func _() {

4
internal/lsp/testdata/summary.txt.golden поставляемый
Просмотреть файл

@ -1,14 +1,14 @@
-- summary --
CallHierarchyCount = 2
CodeLensCount = 5
CompletionsCount = 263
CompletionsCount = 265
CompletionSnippetCount = 106
UnimportedCompletionsCount = 5
DeepCompletionsCount = 5
FuzzyCompletionsCount = 8
RankedCompletionsCount = 164
CaseSensitiveCompletionsCount = 4
DiagnosticsCount = 37
DiagnosticsCount = 38
FoldingRangesCount = 2
FormatCount = 6
ImportCount = 8

Просмотреть файл

@ -1,14 +1,14 @@
-- summary --
CallHierarchyCount = 2
CodeLensCount = 5
CompletionsCount = 264
CompletionsCount = 266
CompletionSnippetCount = 116
UnimportedCompletionsCount = 5
DeepCompletionsCount = 5
FuzzyCompletionsCount = 8
RankedCompletionsCount = 174
CaseSensitiveCompletionsCount = 4
DiagnosticsCount = 37
DiagnosticsCount = 38
FoldingRangesCount = 2
FormatCount = 6
ImportCount = 8