aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorFrédéric G. MARAND <fgmarand@gmail.com>2025-10-01 12:46:16 +0000
committerGopher Robot <gobot@golang.org>2025-10-01 09:13:30 -0700
commit3f451f2c54c87db8b8f30e4d5224933f7895f453 (patch)
tree609acc0c98623af65c23cb5011280b7c82273bc9 /src/testing
parentbe0fed8a5fc4e34f2c6caf503830bcdf904ded54 (diff)
downloadgo-3f451f2c54c87db8b8f30e4d5224933f7895f453.tar.xz
testing/synctest: fix inverted test failure message in TestContextAfterFunc
Fixes #75685 Change-Id: I5592becfde6aaca3d7f0e2f09bc7a9785228523e GitHub-Last-Rev: 0ff7bd31ecfc23222dae70194621397330f3c2da GitHub-Pull-Request: golang/go#75687 Reviewed-on: https://go-review.googlesource.com/c/go/+/708275 Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Damien Neil <dneil@google.com> Auto-Submit: Sean Liao <sean@liao.dev> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Sean Liao <sean@liao.dev>
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/synctest/example_test.go2
-rw-r--r--src/testing/synctest/synctest.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/testing/synctest/example_test.go b/src/testing/synctest/example_test.go
index 843377ea88..a86d87fcec 100644
--- a/src/testing/synctest/example_test.go
+++ b/src/testing/synctest/example_test.go
@@ -66,7 +66,7 @@ func TestContextAfterFunc(t *testing.T) {
cancel()
synctest.Wait()
if !afterFuncCalled {
- t.Fatalf("before context is canceled: AfterFunc not called")
+ t.Fatalf("after context is canceled: AfterFunc not called")
}
})
}
diff --git a/src/testing/synctest/synctest.go b/src/testing/synctest/synctest.go
index 707383f9c7..9f499515b8 100644
--- a/src/testing/synctest/synctest.go
+++ b/src/testing/synctest/synctest.go
@@ -147,7 +147,7 @@
// cancel()
// synctest.Wait()
// if !afterFuncCalled {
-// t.Fatalf("before context is canceled: AfterFunc not called")
+// t.Fatalf("after context is canceled: AfterFunc not called")
// }
// })
// }