diff --git a/proto/fuzz_test.go b/proto/fuzz_test.go index c701e8b6..23552f60 100644 --- a/proto/fuzz_test.go +++ b/proto/fuzz_test.go @@ -19,22 +19,6 @@ import ( testfuzzpb "google.golang.org/protobuf/internal/testprotos/editionsfuzztest" ) -func TestUnmarshalInvalidGroupField(t *testing.T) { - in := []byte("\x82\x01\x010") - // Test proto2 proto - proto2Proto := &testfuzzpb.TestAllTypesProto2{} - - if err := proto.Unmarshal(in, proto2Proto); err != nil { - t.Error(err) - } - // Test equivalent editions proto - editionsProto := &testfuzzpb.TestAllTypesProto2Editions{} - - if err := proto.Unmarshal(in, editionsProto); err != nil { - t.Error(err) - } -} - // compareEquivalentProtos compares equivalent messages m0 and m1, where one is // typically a Protobuf Editions message and the other isn't. It unmarshals the // wireBytes into a message of type m0 and one of type m1 and compares the @@ -87,6 +71,7 @@ func compareEquivalentProtos(t *testing.T, wireBytes []byte, m0, m1 proto.Messag func FuzzProto2EditionConversion(f *testing.F) { f.Add([]byte("Hello World!")) + f.Add([]byte("\x82\x01\x010")) f.Fuzz(func(t *testing.T, in []byte) { compareEquivalentProtos(t, in, (*testfuzzpb.TestAllTypesProto2)(nil), (*testfuzzpb.TestAllTypesProto2Editions)(nil)) }) @@ -94,6 +79,7 @@ func FuzzProto2EditionConversion(f *testing.F) { func FuzzProto3EditionConversion(f *testing.F) { f.Add([]byte("Hello World!")) + f.Add([]byte("\x82\x01\x010")) f.Fuzz(func(t *testing.T, in []byte) { compareEquivalentProtos(t, in, (*testfuzzpb.TestAllTypesProto3)(nil), (*testfuzzpb.TestAllTypesProto3Editions)(nil)) })