aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/testing/fuzz.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-02-18 13:10:34 -0800
committerIan Lance Taylor <iant@golang.org>2022-02-18 13:12:08 -0800
commit20a33efdf32bf0aedcb0c9813ddc7572bb1ab8c7 (patch)
tree94aec72c2092a11fa49f0b45da8e036f13416209 /libgo/go/testing/fuzz.go
parent1931cbad498e625b1e24452dcfffe02539b12224 (diff)
downloadgcc-20a33efdf32bf0aedcb0c9813ddc7572bb1ab8c7.zip
gcc-20a33efdf32bf0aedcb0c9813ddc7572bb1ab8c7.tar.gz
gcc-20a33efdf32bf0aedcb0c9813ddc7572bb1ab8c7.tar.bz2
libgo: update to Go1.18rc1 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/386594
Diffstat (limited to 'libgo/go/testing/fuzz.go')
-rw-r--r--libgo/go/testing/fuzz.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/libgo/go/testing/fuzz.go b/libgo/go/testing/fuzz.go
index e1d7544..b5e1339 100644
--- a/libgo/go/testing/fuzz.go
+++ b/libgo/go/testing/fuzz.go
@@ -227,6 +227,9 @@ func (f *F) Fuzz(ff any) {
if fnType.NumIn() < 2 || fnType.In(0) != reflect.TypeOf((*T)(nil)) {
panic("testing: fuzz target must receive at least two arguments, where the first argument is a *T")
}
+ if fnType.NumOut() != 0 {
+ panic("testing: fuzz target must not return a value")
+ }
// Save the types of the function to compare against the corpus.
var types []reflect.Type