func TestFooProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFoo(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &Foo{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } }
func TestVerifierStateProtoCompactText(t *testing.T) { t.Skip() popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedVerifierState(popr, true) data := github_com_andres_erbsen_protobuf_proto.CompactTextString(p) msg := &VerifierState{} if err := github_com_andres_erbsen_protobuf_proto.UnmarshalText(data, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) } if !p.Equal(msg) { t.Fatalf("%#v !Proto %#v", msg, p) } }
func TestOldWithGroup_Group2ProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedOldWithGroup_Group2(popr, true) data := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &OldWithGroup_Group2{} if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } }
func TestNothingProtoCompactText(t *testing.T) { t.Skip() seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedNothing(popr, true) data := github_com_andres_erbsen_protobuf_proto.CompactTextString(p) msg := &Nothing{} if err := github_com_andres_erbsen_protobuf_proto.UnmarshalText(data, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } }
func (m *Communique_SomeGroup) String() string { return proto.CompactTextString(m) }
func (m *OtherReplyExtensions) String() string { return proto.CompactTextString(m) }
func (m *OldReply) String() string { return proto.CompactTextString(m) }
func (m *Widget) String() string { return proto.CompactTextString(m) }
func (m *OtherBase) String() string { return proto.CompactTextString(m) }
func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) }
func (m *Inside) String() string { return proto.CompactTextString(m) }
func (m *MessageWithMap) String() string { return proto.CompactTextString(m) }
func (m *IndexQueries) String() string { return proto.CompactTextString(m) }
func TestCompactText(t *testing.T) { s := proto.CompactTextString(newTestMessage()) if s != compactText { t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v\n===\n", s, compactText) } }
func (m *Nested) String() string { return proto.CompactTextString(m) }
func (m *FooWithRepeated) String() string { return proto.CompactTextString(m) }
func (m *NinOptEnum) String() string { return proto.CompactTextString(m) }
func (m *MoreDefaultsA) String() string { return proto.CompactTextString(m) }
func (m *Communique_Delta) String() string { return proto.CompactTextString(m) }
func (m *Aproto3) String() string { return proto.CompactTextString(m) }
func (m *Object) String() string { return proto.CompactTextString(m) }
func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) }
func (m *SizeMessage) String() string { return proto.CompactTextString(m) }
func (m *Simple3) String() string { return proto.CompactTextString(m) }
func (m *Request) String() string { return proto.CompactTextString(m) }
func (m *MsgWithOneof) String() string { return proto.CompactTextString(m) }
func (m *Request_SomeGroup) String() string { return proto.CompactTextString(m) }
func (m *Reply_Entry) String() string { return proto.CompactTextString(m) }
func (m *Mappy) String() string { return proto.CompactTextString(m) }
func (m *Repeats) String() string { return proto.CompactTextString(m) }