diff options
Diffstat (limited to 'libgo/go/testing/fuzz.go')
-rw-r--r-- | libgo/go/testing/fuzz.go | 3 |
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 |