(t *testing.T)
| 251 | } |
| 252 | |
| 253 | func TestUnmarshalOverwriteAny(t *testing.T) { |
| 254 | pb := &anypb.Any{} |
| 255 | err := proto.UnmarshalText(` |
| 256 | [type.googleapis.com/a/path/proto3_test.Nested]: < |
| 257 | bunny: "Monty" |
| 258 | > |
| 259 | [type.googleapis.com/a/path/proto3_test.Nested]: < |
| 260 | bunny: "Rabbit of Caerbannog" |
| 261 | > |
| 262 | `, pb) |
| 263 | want := `line 7: Any message unpacked multiple times, or "type_url" already set` |
| 264 | if err.Error() != want { |
| 265 | t.Errorf("incorrect error:\ngot: %v\nwant: %v", err.Error(), want) |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | func TestUnmarshalAnyMixAndMatch(t *testing.T) { |
| 270 | pb := &anypb.Any{} |
nothing calls this directly
no test coverage detected