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

Function TestMarshaling

jsonpb/json_test.go:511–520  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

509}
510
511func TestMarshaling(t *testing.T) {
512 for _, tt := range marshalingTests {
513 json, err := tt.marshaler.MarshalToString(tt.pb)
514 if err != nil {
515 t.Errorf("%s: marshaling error: %v", tt.desc, err)
516 } else if tt.json != json {
517 t.Errorf("%s:\ngot: %v\nwant: %v", tt.desc, json, tt.json)
518 }
519 }
520}
521
522func TestMarshalingNil(t *testing.T) {
523 var msg *pb2.Simple

Callers

nothing calls this directly

Calls 1

MarshalToStringMethod · 0.80

Tested by

no test coverage detected