aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/testing
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
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')
-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
//