(t *testing.T)
| 1303 | } |
| 1304 | |
| 1305 | func TestProto3TextParsing(t *testing.T) { |
| 1306 | m := new(pb3.Message) |
| 1307 | const in = `name: "Wallace" true_scotsman: true` |
| 1308 | want := &pb3.Message{ |
| 1309 | Name: "Wallace", |
| 1310 | TrueScotsman: true, |
| 1311 | } |
| 1312 | if err := proto.UnmarshalText(in, m); err != nil { |
| 1313 | t.Fatal(err) |
| 1314 | } |
| 1315 | if !proto.Equal(m, want) { |
| 1316 | t.Errorf("proto.Equal mismatch:\ngot: %v\nwant %v", m, want) |
| 1317 | } |
| 1318 | } |
| 1319 | |
| 1320 | func TestMapParsing(t *testing.T) { |
| 1321 | m := new(pb2.MessageWithMap) |
nothing calls this directly
no test coverage detected