]> Cypherpunks repositories - gostls13.git/commit
testing: support B.Context and F.Context
authorIan Lance Taylor <iant@golang.org>
Tue, 17 Dec 2024 23:31:10 +0000 (15:31 -0800)
committerDavid Chase <drchase@google.com>
Wed, 18 Dec 2024 16:18:04 +0000 (08:18 -0800)
commit971448ddf8c55a5f4a829735a5a96cacf982f230
treee1a5dc1217e242b39c50a8a25d9ca7ba4fd98d50
parent95b433eed428afbb4ab32f0f2541774e939989c7
testing: support B.Context and F.Context

CL 603959 added T.Context for #36532.

The discussion on the proposal only mentions t.Context.
However, the implementation of CL 603959 also added B.Context and F.Context.
They were added to the API listing, and B.Context was mentioned in
the release notes.

Unfortunately, the new B.Context and F.Context methods always
returned nil, rather than a context.Context value.

This change adds a working implementation of B.Context and F.Context.

For #36532
Fixes #70866

Change-Id: I8a44e6649fb658e4f641ffb7efd08b4374f578ef
Reviewed-on: https://go-review.googlesource.com/c/go/+/637236
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
src/cmd/go/testdata/script/test_fuzz_context.txt [new file with mode: 0644]
src/testing/benchmark.go
src/testing/benchmark_test.go
src/testing/fuzz.go
src/testing/testing.go