MCPcopy
hub / github.com/golang/protobuf / fuzzUnmarshal

Function fuzzUnmarshal

proto/proto_test.go:1795–1806  ·  view source on GitHub ↗
(t *testing.T, data []byte)

Source from the content-addressed store, hash-verified

1793}
1794
1795func fuzzUnmarshal(t *testing.T, data []byte) {
1796 defer func() {
1797 if e := recover(); e != nil {
1798 t.Errorf("These bytes caused a panic: %+v", data)
1799 t.Logf("Stack:\n%s", debug.Stack())
1800 t.FailNow()
1801 }
1802 }()
1803
1804 pb := new(pb2.MyMessage)
1805 proto.Unmarshal(data, pb)
1806}
1807
1808func TestMapFieldMarshal(t *testing.T) {
1809 m := &pb2.MessageWithMap{

Callers 1

TestUnmarshalFuzzFunction · 0.85

Calls 1

UnmarshalFunction · 0.92

Tested by

no test coverage detected