()
| 34 | } |
| 35 | |
| 36 | func init() { |
| 37 | ext := &pb2.Ext{ |
| 38 | Data: proto.String("extension"), |
| 39 | } |
| 40 | if err := proto.SetExtension(cloneTestMessage, pb2.E_Ext_More, ext); err != nil { |
| 41 | panic("SetExtension: " + err.Error()) |
| 42 | } |
| 43 | if err := proto.SetExtension(cloneTestMessage, pb2.E_Ext_Text, proto.String("hello")); err != nil { |
| 44 | panic("SetExtension: " + err.Error()) |
| 45 | } |
| 46 | if err := proto.SetExtension(cloneTestMessage, pb2.E_Greeting, []string{"one", "two"}); err != nil { |
| 47 | panic("SetExtension: " + err.Error()) |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | func TestClone(t *testing.T) { |
| 52 | // Create a clone using a marshal/unmarshal roundtrip. |
nothing calls this directly
no test coverage detected