(t *testing.T)
| 397 | ` |
| 398 | |
| 399 | func TestMarshalText(t *testing.T) { |
| 400 | buf := new(bytes.Buffer) |
| 401 | if err := proto.MarshalText(buf, newTestMessage()); err != nil { |
| 402 | t.Fatalf("proto.MarshalText: %v", err) |
| 403 | } |
| 404 | got := buf.String() |
| 405 | if diff := cmp.Diff(text, got); got != text { |
| 406 | t.Errorf("diff (-want +got):\n%v\n\ngot:\n%v\n\nwant:\n%v", diff, got, text) |
| 407 | } |
| 408 | } |
| 409 | |
| 410 | func TestMarshalTextCustomMessage(t *testing.T) { |
| 411 | buf := new(bytes.Buffer) |
nothing calls this directly
no test coverage detected