! stdout ^ok
stdout FAIL
-
-# Fuzzing indicates that one new interesting value was found with an empty
-# corpus, and the total size of the cache is now 1.
-go clean -fuzzcache
-go test -fuzz=Fuzz -fuzztime=10000x success_fuzz_test.go
-stdout 'new interesting: 1'
-stdout 'total: 1'
-
-# Fuzzing again with a small fuzztime does not find any other interesting
-# values but still indicates that the cache size is 1.
-go test -fuzz=Fuzz -fuzztime=2x success_fuzz_test.go
-stdout 'new interesting: 0'
-stdout 'total: 1'
-
-- noop_fuzz_test.go --
package noop_fuzz
go list -f {{.Stale}} ./empty
stdout false
+# Fuzzing indicates that one new interesting value was found with an empty
+# corpus, and the total size of the cache is now 1.
+go clean -fuzzcache
+go test -fuzz=FuzzEmpty -fuzztime=10000x .
+stdout 'new interesting: 1'
+stdout 'total: 1'
+
+# Fuzzing again with a small fuzztime does not find any other interesting
+# values but still indicates that the cache size is 1.
+go test -fuzz=FuzzEmpty -fuzztime=2x .
+stdout 'new interesting: 0'
+stdout 'total: 1'
+
-- go.mod --
module example.com/y
"testing"
)
+func FuzzEmpty(f *testing.F) {
+ f.Fuzz(func (*testing.T, []byte) {})
+}
+
func FuzzY(f *testing.F) {
f.Add([]byte("y"))
f.Fuzz(func(t *testing.T, b []byte) { Y(io.Discard, b) })