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

Function TestUnmarshalAnyMixAndMatch

proto/any_test.go:288–300  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

286}
287
288func TestUnmarshalAnyMixAndMatch(t *testing.T) {
289 pb := &types.Any{}
290 err := proto.UnmarshalText(`
291 value: "\n\x05Monty"
292 [type.googleapis.com/a/path/proto3_proto.Nested]: <
293 bunny: "Rabbit of Caerbannog"
294 >
295 `, pb)
296 want := `line 5: Any message unpacked multiple times, or "value" already set`
297 if err.Error() != want {
298 t.Errorf("incorrect error.\nHave: %v\nWant: %v", err.Error(), want)
299 }
300}

Callers

nothing calls this directly

Calls 2

UnmarshalTextFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…