Text file src/cmd/go/testdata/script/test_fuzz_return.txt

     1  [short] skip
     2  
     3  ! go test .
     4  stdout '^panic: testing: fuzz target must not return a value \[recovered\]$'
     5  
     6  -- go.mod --
     7  module test
     8  go 1.18
     9  -- x_test.go --
    10  package test
    11  
    12  import "testing"
    13  
    14  func FuzzReturnErr(f *testing.F) {
    15  	f.Add("hello, validation!")
    16  	f.Fuzz(func(t *testing.T, in string) string {
    17  		return in
    18  	})
    19  }
    20  

View as plain text