// This does some "fuzz testing" by attempting to decode a sequence of random bytes.
func TestFuzz(t *testing.T) {
if !*doFuzzTests {
- t.Logf("disabled; run with -gob.fuzz to enable")
- return
+ t.Skipf("disabled; run with -gob.fuzz to enable")
}
// all possible inputs
func TestFuzzRegressions(t *testing.T) {
if !*doFuzzTests {
- t.Logf("disabled; run with -gob.fuzz to enable")
- return
+ t.Skipf("disabled; run with -gob.fuzz to enable")
}
// An instance triggering a type name of length ~102 GB.
// TestFuzzOneByte tries to decode corrupted input sequences
// and checks that no panic occurs.
func TestFuzzOneByte(t *testing.T) {
+ if !*doFuzzTests {
+ t.Skipf("disabled; run with -gob.fuzz to enable")
+ }
+
buf := new(bytes.Buffer)
Register(OnTheFly{})
dt := newDT()