Skip to content

Commit

Permalink
Allow to pass a custom fuzzing function to FuzzConsistency (#53)
Browse files Browse the repository at this point in the history
Allow to pass a custom fuzzing function to FuzzConsistentcy
  • Loading branch information
fasmat authored Mar 27, 2023
1 parent 816695f commit 1dc7783
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tester/fuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"github.com/spacemeshos/go-scale"
)

func FuzzConsistency[T any, H scale.TypePtr[T]](f *testing.F) {
func FuzzConsistency[T any, H scale.TypePtr[T]](f *testing.F, fuzzFuncs ...any) {
f.Fuzz(func(t *testing.T, data []byte) {
fuzzer := fuzz.NewFromGoFuzz(data)
fuzzer := fuzz.NewFromGoFuzz(data).Funcs(fuzzFuncs...)
var object T
fuzzer.Fuzz(&object)

Expand Down

0 comments on commit 1dc7783

Please sign in to comment.