Regression test; this caused a panic.
(t *testing.T)
| 1290 | |
| 1291 | // Regression test; this caused a panic. |
| 1292 | func TestRepeatedEnum(t *testing.T) { |
| 1293 | pb := new(pb2.RepeatedEnum) |
| 1294 | if err := proto.UnmarshalText("color: RED", pb); err != nil { |
| 1295 | t.Fatal(err) |
| 1296 | } |
| 1297 | exp := &pb2.RepeatedEnum{ |
| 1298 | Color: []pb2.RepeatedEnum_Color{pb2.RepeatedEnum_RED}, |
| 1299 | } |
| 1300 | if !proto.Equal(pb, exp) { |
| 1301 | t.Errorf("proto.Equal mismatch:\ngot: %v\nwant %v", pb, exp) |
| 1302 | } |
| 1303 | } |
| 1304 | |
| 1305 | func TestProto3TextParsing(t *testing.T) { |
| 1306 | m := new(pb3.Message) |
nothing calls this directly
no test coverage detected