Searched refs:cloneTestMessage (Results 1 – 1 of 1) sorted by relevance
/external/golang-protobuf/proto/ |
D | clone_test.go | 43 var cloneTestMessage = &pb.MyMessage{ var 67 if err := proto.SetExtension(cloneTestMessage, pb.E_Ext_More, ext); err != nil { 70 if err := proto.SetExtension(cloneTestMessage, pb.E_Ext_Text, proto.String("hello")); err != nil { 73 if err := proto.SetExtension(cloneTestMessage, pb.E_Greeting, []string{"one", "two"}); err != nil { 81 b, err := proto.Marshal(cloneTestMessage) 90 m := proto.Clone(cloneTestMessage).(*pb.MyMessage) 91 if !proto.Equal(m, cloneTestMessage) { 92 t.Fatalf("Clone(%v) = %v", cloneTestMessage, m) 112 if !proto.Equal(cloneTestMessage, vanilla) { 113 t.Fatalf("mutation on original detected:\ngot %v\nwant %v", cloneTestMessage, vanilla)
|