aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.go
diff options
context:
space:
mode:
authorJay Conrod <jayconrod@google.com>2021-02-09 10:36:27 -0500
committerJay Conrod <jayconrod@google.com>2021-02-10 18:21:14 +0000
commit1b5cf71ccf0dc95f121830cfdad8280c4f6c1f28 (patch)
tree838186133dd77f738eb9ce4312d8a46591b3ee83 /src/testing/testing.go
parentb9c88eaab915874bc004f579940b10fe48bba36b (diff)
downloadgo-1b5cf71ccf0dc95f121830cfdad8280c4f6c1f28.tar.xz
[dev.fuzz] internal/fuzz: make RunFuzzWorker accept CorpusEntry
RunFuzzWorker now accepts a fuzz.CorpusEntry instead of []byte. This may help us pass structured data in the future. Change-Id: Idf7754cb890b6a835d887032fd23ade4d0713bcf Reviewed-on: https://go-review.googlesource.com/c/go/+/290692 Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Katie Hockman <katie@golang.org>
Diffstat (limited to 'src/testing/testing.go')
-rw-r--r--src/testing/testing.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/testing/testing.go b/src/testing/testing.go
index e2abec2224..72529956c3 100644
--- a/src/testing/testing.go
+++ b/src/testing/testing.go
@@ -1364,8 +1364,8 @@ func (f matchStringOnly) SetPanicOnExit0(bool) {}
func (f matchStringOnly) CoordinateFuzzing(time.Duration, int, []corpusEntry, string, string) error {
return errMain
}
-func (f matchStringOnly) RunFuzzWorker(func([]byte) error) error { return errMain }
-func (f matchStringOnly) ReadCorpus(string) ([]corpusEntry, error) { return nil, errMain }
+func (f matchStringOnly) RunFuzzWorker(func(corpusEntry) error) error { return errMain }
+func (f matchStringOnly) ReadCorpus(string) ([]corpusEntry, error) { return nil, errMain }
// Main is an internal function, part of the implementation of the "go test" command.
// It was exported because it is cross-package and predates "internal" packages.
@@ -1409,7 +1409,7 @@ type testDeps interface {
StopTestLog() error
WriteProfileTo(string, io.Writer, int) error
CoordinateFuzzing(time.Duration, int, []corpusEntry, string, string) error
- RunFuzzWorker(func([]byte) error) error
+ RunFuzzWorker(func(corpusEntry) error) error
ReadCorpus(string) ([]corpusEntry, error)
}