Skip to content

Commit e339297

Browse files
committed
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Robert Findley <[email protected]>
1 parent fc95973 commit e339297

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

internal/lsp/regtest/diagnostics_test.go

+12-4
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,21 @@ go 1.12
5151
`
5252

5353
func TestMissingImportDiagsClearOnFirstFile(t *testing.T) {
54-
t.Skip("skipping due to golang.org/issues/37195")
5554
t.Parallel()
5655
runner.Run(t, onlyMod, func(t *testing.T, env *Env) {
57-
env.CreateBuffer("main.go", "package main\n\nfunc m() {\nlog.Println()\n}")
56+
env.CreateBuffer("main.go", `package main
57+
58+
func m() {
59+
log.Println()
60+
}
61+
`)
62+
env.Await(
63+
env.DiagnosticAtRegexp("main.go", "log"),
64+
)
5865
env.SaveBuffer("main.go")
59-
// TODO: this shouldn't actually happen
60-
env.Await(env.DiagnosticAtRegexp("main.go", "Println"))
66+
env.Await(
67+
EmptyDiagnostics("main.go"),
68+
)
6169
})
6270
}
6371

0 commit comments

Comments
 (0)