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

Function TestUnmarshalTextCustomMessage

proto/text_parser_test.go:589–597  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

587}
588
589func TestUnmarshalTextCustomMessage(t *testing.T) {
590 msg := &textMessage{}
591 if err := UnmarshalText("custom", msg); err != nil {
592 t.Errorf("Unexpected error from custom unmarshal: %v", err)
593 }
594 if UnmarshalText("not custom", msg) == nil {
595 t.Errorf("Didn't get expected error from custom unmarshal")
596 }
597}
598
599// Regression test; this caused a panic.
600func TestRepeatedEnum(t *testing.T) {

Callers

nothing calls this directly

Calls 1

UnmarshalTextFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…