aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/testing
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/testing')
-rw-r--r--libgo/go/testing/fuzz.go3
-rw-r--r--libgo/go/testing/testing.go3
2 files changed, 4 insertions, 2 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
diff --git a/libgo/go/testing/testing.go b/libgo/go/testing/testing.go
index 827b23b..9ecd59c 100644
--- a/libgo/go/testing/testing.go
+++ b/libgo/go/testing/testing.go
@@ -202,8 +202,7 @@
// mode, the fuzz test acts much like a regular test, with subtests started
// with F.Fuzz instead of T.Run.
//
-// TODO(#48255): write and link to documentation that will be helpful to users
-// who are unfamiliar with fuzzing.
+// See https://go.dev/doc/fuzz for documentation about fuzzing.
//
// Skipping
//