(t *testing.T)
| 222 | } |
| 223 | |
| 224 | func TestMarshalUnknownAny(t *testing.T) { |
| 225 | m := &pb3.Message{ |
| 226 | Anything: &anypb.Any{ |
| 227 | TypeUrl: "foo", |
| 228 | Value: []byte("bar"), |
| 229 | }, |
| 230 | } |
| 231 | want := `anything: < |
| 232 | type_url: "foo" |
| 233 | value: "bar" |
| 234 | > |
| 235 | ` |
| 236 | got := expandedMarshaler.Text(m) |
| 237 | if got != want { |
| 238 | t.Errorf("got:\n%s\nwant:\n%s", got, want) |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | func TestAmbiguousAny(t *testing.T) { |
| 243 | pb := &anypb.Any{} |