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

Function TestMerge

proto/proto_clone_test.go:367–379  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

365}
366
367func TestMerge(t *testing.T) {
368 for _, m := range mergeTests {
369 got := proto.Clone(m.dst)
370 if !proto.Equal(got, m.dst) {
371 t.Errorf("Clone()\ngot %v\nwant %v", got, m.dst)
372 continue
373 }
374 proto.Merge(got, m.src)
375 if !proto.Equal(got, m.want) {
376 t.Errorf("Merge(%v, %v)\ngot %v\nwant %v", m.dst, m.src, got, m.want)
377 }
378 }
379}

Callers

nothing calls this directly

Calls 3

CloneFunction · 0.92
EqualFunction · 0.92
MergeFunction · 0.92

Tested by

no test coverage detected