1
0
mirror of https://github.com/golang/go synced 2024-11-18 22:55:23 -07:00
go/internal/lsp/tests
Iskander Sharipov 27b81bef4a internal/lsp/tests: add error handling for @item()
If there are less than 3 args for @item, it does an early
return without recording it for a given pos.
This leads to a panic when tests runner can't lookup
a non-nil item for a pos.

Since other collect* methods seem to use t.Fatal for error
handling, do the same in collectCompletionItems().

Change-Id: I21960731f532b93029e6e06800e0484dc7d599df
Reviewed-on: https://go-review.googlesource.com/c/tools/+/211257
Run-TryBot: Iskander Sharipov <quasilyte@gmail.com>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-12-13 18:39:29 +00:00
..
completion.go internal/lsp: reorganize the generated Go code for the lsp protocol 2019-11-18 19:51:19 +00:00
diagnostics.go internal/lsp: don't resend diagnostics if they are unchanged 2019-12-12 04:27:51 +00:00
links.go tools/gopls: add command line support for links 2019-11-01 17:18:15 +00:00
tests_cgo.go internal/lsp/tests: skip cgo tests when not supported 2019-11-25 21:54:41 +00:00
tests.go internal/lsp/tests: add error handling for @item() 2019-12-13 18:39:29 +00:00