]> Cypherpunks repositories - gostls13.git/commit
testing: panic in Fuzz if the function returns a value
authorBryan C. Mills <bcmills@google.com>
Wed, 16 Feb 2022 15:52:01 +0000 (10:52 -0500)
committerBryan Mills <bcmills@google.com>
Wed, 16 Feb 2022 16:06:39 +0000 (16:06 +0000)
commitf985833dec19b0147db3c5c33d3bf0181891d458
tree73ea1d2b66e8867fc7efeb355a4f581ce1b4f2e4
parent5d8d3878496918d51347422d651629975343b18e
testing: panic in Fuzz if the function returns a value

Otherwise, the behavior of a fuzz target that returns an error could
be confusing.

Fuzz is already documented to require a function “with no return
value”, so this fixes the implementation to match the existing
documentation.

Fixes #51222

Change-Id: I44ca7ee10960214c92f5ac066ac8484c8bb9cd6f
Reviewed-on: https://go-review.googlesource.com/c/go/+/386175
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Nooras Saba‎ <saba@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/go/testdata/script/test_fuzz_return.txt [new file with mode: 0644]
src/testing/fuzz.go