Skip to content

Commit 91b6070

Browse files
committed
gopls/internal/regtest: eliminate DiagnosticAtRegexp
Replace DiagnosticAtRegexp with diagnostic filters. This allowed eliminating DiagnosticExpectation, which was the only complicated implementation of the Expectation interface. Replace Expectation with the concrete (formerly named) SimpleExpectation. Updates golang/go#39384 Change-Id: I6716e869609dce9777025557494c8f81a606e4ff Reviewed-on: https://go-review.googlesource.com/c/tools/+/461939 Run-TryBot: Robert Findley <[email protected]> Reviewed-by: Alan Donovan <[email protected]> TryBot-Result: Gopher Robot <[email protected]> gopls-CI: kokoro <[email protected]>
1 parent bd48b9a commit 91b6070

20 files changed

+224
-345
lines changed

gopls/internal/lsp/regtest/env.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func checkExpectations(s State, expectations []Expectation) (Verdict, string) {
297297
if v > finalVerdict {
298298
finalVerdict = v
299299
}
300-
summary.WriteString(fmt.Sprintf("%v: %s\n", v, e.Description()))
300+
summary.WriteString(fmt.Sprintf("%v: %s\n", v, e.Description))
301301
}
302302
return finalVerdict, summary.String()
303303
}

0 commit comments

Comments
 (0)