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

Function TestMarshalingNil

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

Source from the content-addressed store, hash-verified

520}
521
522func TestMarshalingNil(t *testing.T) {
523 var msg *pb2.Simple
524 m := &Marshaler{}
525 if _, err := m.MarshalToString(msg); err == nil {
526 t.Errorf("mashaling nil returned no error")
527 }
528}
529
530func TestMarshalIllegalTime(t *testing.T) {
531 tests := []struct {

Callers

nothing calls this directly

Calls 1

MarshalToStringMethod · 0.95

Tested by

no test coverage detected