go.mod: update fuzz-headers and fuzz-build

Slowly chipping away non-tagged golang.org/x/ packages

diffs:

- b2031950a3...5330a85ea6
- 3345c89a7c...d395f97c48

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2022-12-15 17:36:05 +01:00
parent 12f30e6524
commit ce4ea26953
8 changed files with 103 additions and 27 deletions

View File

@@ -3,6 +3,7 @@ package testing
import (
"fmt"
fuzz "github.com/AdaLogics/go-fuzz-headers"
"os"
"reflect"
)
@@ -12,6 +13,10 @@ type F struct {
FuzzFunc func(*T, any)
}
func (f *F) CleanupTempDirs() {
f.T.CleanupTempDirs()
}
func (f *F) Add(args ...any) {}
func (c *F) Cleanup(f func()) {}
func (c *F) Error(args ...any) {}
@@ -173,10 +178,10 @@ func (f *F) Fuzz(ff any) {
}
func (f *F) Helper() {}
func (c *F) Log(args ...any) {
fmt.Println(args)
fmt.Println(args...)
}
func (c *F) Logf(format string, args ...any) {
fmt.Println(format, args, "\n")
fmt.Println(format, args)
}
func (c *F) Name() string { return "libFuzzer" }
func (c *F) Setenv(key, value string) {}
@@ -190,6 +195,13 @@ func (c *F) Skipf(format string, args ...any) {
panic("GO-FUZZ-BUILD-PANIC")
}
func (f *F) Skipped() bool { return false }
func (c *F) TempDir() string {
panic("TempDir() is not supported")
func (f *F) TempDir() string {
dir, err := os.MkdirTemp("", "fuzzdir-")
if err != nil {
panic(err)
}
f.T.TempDirs = append(f.T.TempDirs, dir)
return dir
}