MCPcopy
hub / github.com/gogo/protobuf / encodeDecode

Function encodeDecode

proto/all_test.go:1201–1209  ·  view source on GitHub ↗
(t *testing.T, in, out Message, msg string)

Source from the content-addressed store, hash-verified

1199}
1200
1201func encodeDecode(t *testing.T, in, out Message, msg string) {
1202 buf, err := Marshal(in)
1203 if err != nil {
1204 t.Fatalf("failed marshaling %v: %v", msg, err)
1205 }
1206 if err := Unmarshal(buf, out); err != nil {
1207 t.Fatalf("failed unmarshaling %v: %v", msg, err)
1208 }
1209}
1210
1211func TestPackedNonPackedDecoderSwitching(t *testing.T) {
1212 np, p := new(NonPackedTest), new(PackedTest)

Callers 1

Calls 2

MarshalFunction · 0.85
UnmarshalFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…