Text file src/cmd/go/testdata/script/test_fuzz_return.txt
1 [short] skip 2 3 # Disable vet, as its "tests" analyzer would report the same problem statically. 4 5 ! go test -vet=off . 6 stdout '^panic: testing: fuzz target must not return a value \[recovered\]$' 7 8 -- go.mod -- 9 module test 10 go 1.18 11 -- x_test.go -- 12 package test 13 14 import "testing" 15 16 func Fuzz_returnErr(f *testing.F) { 17 f.Add("hello, validation!") 18 f.Fuzz(func(t *testing.T, in string) string { 19 return in 20 }) 21 } 22