1
0
mirror of https://github.com/golang/go synced 2024-11-18 11:04:42 -07:00

internal/lsp/regtest: enable test for golang/go#37195

I believe that other changes in gopls/v0.4.0 also fixed the issue that
this regression test was written for. Re-enable it, and change it to
assert that diagnostics are cleared.

Fixes golang/go#37195

Change-Id: I4538186ad288d9c6f70cc450f948b62f3868941f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/228723
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
Rebecca Stambler 2020-04-16 23:25:57 -04:00
parent fc959738d6
commit e33929705b

View File

@ -51,13 +51,21 @@ go 1.12
`
func TestMissingImportDiagsClearOnFirstFile(t *testing.T) {
t.Skip("skipping due to golang.org/issues/37195")
t.Parallel()
runner.Run(t, onlyMod, func(t *testing.T, env *Env) {
env.CreateBuffer("main.go", "package main\n\nfunc m() {\nlog.Println()\n}")
env.CreateBuffer("main.go", `package main
func m() {
log.Println()
}
`)
env.Await(
env.DiagnosticAtRegexp("main.go", "log"),
)
env.SaveBuffer("main.go")
// TODO: this shouldn't actually happen
env.Await(env.DiagnosticAtRegexp("main.go", "Println"))
env.Await(
EmptyDiagnostics("main.go"),
)
})
}