]> Cypherpunks repositories - gostls13.git/commitdiff
tests: improve consistency and clarity of test diagnostics
authorjjpinto <jorgpinto@gmail.com>
Mon, 29 Dec 2025 19:39:04 +0000 (19:39 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 29 Dec 2025 20:17:32 +0000 (12:17 -0800)
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: b2822e846a91ce2563445f90f8d5768662a9babf
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>
test/cmplxdivide.go
test/map.go

index 49cd5bf5824755e8696586d2d950956192909192..4b8d549fc4d93c95cbda0a8d7d1bea62dffe6638 100644 (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 {
index 2c1cf8a14038259d1453a57e3d4e7a7d27da7ea6..b72fe59bd74b38b722fc22c978125395f46dd229 100644 (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 {