tests: improve consistency and clarity of test diagnostics

Minor updates to test diagnostics for consistency and readability:
- Corrected an incorrect identifier
- Standardized float formatting

No behavior changes.

Change-Id: I3d3633a7cc487209341ea92101f8c67848212080
GitHub-Last-Rev: b2822e846a
GitHub-Pull-Request: golang/go#77001
Reviewed-on: https://go-review.googlesource.com/c/go/+/732762
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
This commit is contained in:
jjpinto
2025-12-29 19:39:04 +00:00
committed by Gopher Robot
parent 3dcb48d298
commit b3ed0627ce
2 changed files with 2 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ func main() {
fmt.Printf("BUG\n")
bad = true
}
fmt.Printf("%v/%v: expected %v error; got %v\n", t.f, t.g, t.out, x)
fmt.Printf("%v/%v: got %v, want %v\n", t.f, t.g, x, t.out)
}
}
if bad {

View File

@@ -431,7 +431,7 @@ func testbasic() {
{
_, b := mpTi[apT[i]]
if b {
panic(fmt.Sprintf("tuple nonexistence decl: mpTi[apt[%d]]", i))
panic(fmt.Sprintf("tuple nonexistence decl: mpTi[apT[%d]]", i))
}
_, b = mpTi[apT[i]]
if b {