Skip to content

Commit

Permalink
gopls/internal/regtest: eliminate DiagnosticAtRegexp
Browse files Browse the repository at this point in the history
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 <rfindley@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
  • Loading branch information
findleyr committed Jan 13, 2023
1 parent bd48b9a commit 91b6070
Show file tree
Hide file tree
Showing 20 changed files with 224 additions and 345 deletions.
2 changes: 1 addition & 1 deletion gopls/internal/lsp/regtest/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func checkExpectations(s State, expectations []Expectation) (Verdict, string) {
if v > finalVerdict {
finalVerdict = v
}
summary.WriteString(fmt.Sprintf("%v: %s\n", v, e.Description()))
summary.WriteString(fmt.Sprintf("%v: %s\n", v, e.Description))
}
return finalVerdict, summary.String()
}
Expand Down
Loading

0 comments on commit 91b6070

Please sign in to comment.