diff options
Diffstat (limited to 'gopls/internal/regtest/misc/embed_test.go')
-rw-r--r-- | gopls/internal/regtest/misc/embed_test.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gopls/internal/regtest/misc/embed_test.go b/gopls/internal/regtest/misc/embed_test.go index 2e66d7866..021fbfcc0 100644 --- a/gopls/internal/regtest/misc/embed_test.go +++ b/gopls/internal/regtest/misc/embed_test.go @@ -6,12 +6,10 @@ package misc import ( "testing" - . "golang.org/x/tools/internal/lsp/regtest" - "golang.org/x/tools/internal/testenv" + . "golang.org/x/tools/gopls/internal/lsp/regtest" ) func TestMissingPatternDiagnostic(t *testing.T) { - testenv.NeedsGo1Point(t, 16) const files = ` -- go.mod -- module example.com @@ -30,8 +28,13 @@ var foo string ` Run(t, files, func(t *testing.T, env *Env) { env.OpenFile("x.go") - env.Await(env.DiagnosticAtRegexpWithMessage("x.go", `NONEXISTENT`, "no matching files found")) + env.AfterChange( + Diagnostics( + env.AtRegexp("x.go", `NONEXISTENT`), + WithMessage("no matching files found"), + ), + ) env.RegexpReplace("x.go", `NONEXISTENT`, "x.go") - env.Await(EmptyDiagnostics("x.go")) + env.AfterChange(NoDiagnostics(ForFile("x.go"))) }) } |