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

Function TestSetDefaultWithRepeatedNonMessage

proto/proto_test.go:1403–1412  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1401}
1402
1403func TestSetDefaultWithRepeatedNonMessage(t *testing.T) {
1404 got := &pb2.MyMessage{
1405 Pet: []string{"turtle", "wombat"},
1406 }
1407 want := proto.Clone(got)
1408 proto.SetDefaults(got)
1409 if !proto.Equal(got, want) {
1410 t.Errorf("\n got %v\nwant %v", got, want)
1411 }
1412}
1413
1414func TestMaximumTagNumber(t *testing.T) {
1415 m := &pb2.MaxTag{

Callers

nothing calls this directly

Calls 3

CloneFunction · 0.92
SetDefaultsFunction · 0.92
EqualFunction · 0.92

Tested by

no test coverage detected