go/gopls/internal/regtest
Rob Findley c8d9e05b1c gopls/internal/regtest: simplify expectation return values
Returning 'metBy' from expectations was not an ideal API, as extracting
the result value was cumbersome and error prone. It also forced quite a
bit of plumbing.

Using OnceMet, we can improve this by instead using a 'ReadDiagnostics'
expectation that reads diagnostics into a variable.

For golang/go#39384

Change-Id: Ia73e5b496089240df3200626e5696305cb507c9a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/255126
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-09-16 12:40:19 +00:00
..
bench_test.go internal/lsp/source: add some additional symbol downranking 2020-09-16 12:25:06 +00:00
codelens_test.go gopls/internal/regtest: simplify regtest EditorConfig 2020-09-16 12:02:33 +00:00
completion_test.go gopls/internal/regtest: skip failing test for go1.13 and below 2020-09-10 15:53:27 +00:00
configuration_test.go gopls/internal/regtest: add an InitialWorkspaceLoad expectation 2020-09-16 12:01:37 +00:00
definition_test.go gopls/integration/regtest: move regtests to the gopls module 2020-09-03 18:25:45 +00:00
diagnostics_test.go gopls/internal/regtest: simplify expectation return values 2020-09-16 12:40:19 +00:00
doc.go gopls/integration/regtest: move regtests to the gopls module 2020-09-03 18:25:45 +00:00
env.go gopls/internal/regtest: simplify expectation return values 2020-09-16 12:40:19 +00:00
env_test.go gopls/integration/regtest: move regtests to the gopls module 2020-09-03 18:25:45 +00:00
expectation.go gopls/internal/regtest: simplify expectation return values 2020-09-16 12:40:19 +00:00
fix_test.go gopls/internal/regtest: add an InitialWorkspaceLoad expectation 2020-09-16 12:01:37 +00:00
formatting_test.go gopls/integration/regtest: move regtests to the gopls module 2020-09-03 18:25:45 +00:00
generate_test.go gopls/integration/regtest: move regtests to the gopls module 2020-09-03 18:25:45 +00:00
imports_test.go gopls/internal/regtest: simplify expectation return values 2020-09-16 12:40:19 +00:00
link_test.go gopls/integration/regtest: move regtests to the gopls module 2020-09-03 18:25:45 +00:00
modfile_test.go gopls/internal/regtest: simplify expectation return values 2020-09-16 12:40:19 +00:00
references_test.go gopls/integration/regtest: move regtests to the gopls module 2020-09-03 18:25:45 +00:00
reg_test.go gopls/integration/regtest: move regtests to the gopls module 2020-09-03 18:25:45 +00:00
runner.go gopls/internal/regtest: simplify regtest EditorConfig 2020-09-16 12:02:33 +00:00
shared_test.go gopls/integration/regtest: move regtests to the gopls module 2020-09-03 18:25:45 +00:00
stress_test.go gopls/integration/regtest: move regtests to the gopls module 2020-09-03 18:25:45 +00:00
symbol_helper_test.go gopls/integration/regtest: move regtests to the gopls module 2020-09-03 18:25:45 +00:00
symbol_test.go internal/lsp/source: add some additional symbol downranking 2020-09-16 12:25:06 +00:00
unix_test.go gopls/internal/regtest: simplify regtest EditorConfig 2020-09-16 12:02:33 +00:00
vendor_test.go gopls/integration/regtest: move regtests to the gopls module 2020-09-03 18:25:45 +00:00
watch_test.go gopls/internal/regtest: add an InitialWorkspaceLoad expectation 2020-09-16 12:01:37 +00:00
workspace_test.go gopls/internal/regtest: add an InitialWorkspaceLoad expectation 2020-09-16 12:01:37 +00:00
wrappers.go internal/lsp: handle staticcheck in didChangeConfiguration 2020-09-13 03:21:22 +00:00