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

Function TestUnmarshalTextCustomMessage

proto/text_test.go:1281–1289  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1279}
1280
1281func TestUnmarshalTextCustomMessage(t *testing.T) {
1282 msg := &textMessage{}
1283 if err := proto.UnmarshalText("custom", msg); err != nil {
1284 t.Errorf("proto.UnmarshalText error: %v", err)
1285 }
1286 if err := proto.UnmarshalText("not custom", msg); err == nil {
1287 t.Errorf("proto.UnmarshalText: got nil error, want non-nil")
1288 }
1289}
1290
1291// Regression test; this caused a panic.
1292func TestRepeatedEnum(t *testing.T) {

Callers

nothing calls this directly

Calls 1

UnmarshalTextFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…