• Home
  • Raw
  • Download

Lines Matching full:want

29 		for _, want := range test.decodeTo {
30 t.Run(fmt.Sprintf("%s (%T)", test.desc, want), func(t *testing.T) {
34 wire, err := opts.Marshal(want)
36 t.Fatalf("Marshal error: %v\nMessage:\n%v", err, prototext.Format(want))
39 size := proto.Size(want)
41 …l disagree: Size(m)=%v; len(Marshal(m))=%v\nMessage:\n%v", size, len(wire), prototext.Format(want))
44 got := want.ProtoReflect().New().Interface()
49 t.Errorf("Unmarshal error: %v\nMessage:\n%v", err, prototext.Format(want))
52 if !proto.Equal(got, want) && got.ProtoReflect().IsValid() && want.ProtoReflect().IsValid() {
53 …al returned unexpected result; got:\n%v\nwant:\n%v", prototext.Format(got), prototext.Format(want))
62 for _, want := range test.decodeTo {
63 t.Run(fmt.Sprintf("%s (%T)", test.desc, want), func(t *testing.T) {
68 wire, err := opts.Marshal(want)
70 t.Fatalf("Marshal error: %v\nMessage:\n%v", err, prototext.Format(want))
72 wire2, err := opts.Marshal(want)
74 t.Fatalf("Marshal error: %v\nMessage:\n%v", err, prototext.Format(want))
80 got := want.ProtoReflect().New().Interface()
85 t.Errorf("Unmarshal error: %v\nMessage:\n%v", err, prototext.Format(want))
88 if !proto.Equal(got, want) && got.ProtoReflect().IsValid() && want.ProtoReflect().IsValid() {
89 …al returned unexpected result; got:\n%v\nwant:\n%v", prototext.Format(got), prototext.Format(want))
105 t.Fatalf("Marshal succeeded (want error)\nMessage:\n%v", prototext.Format(m))
113 want := []byte("prefix")
114 got := append([]byte(nil), want...)
121 if !bytes.HasPrefix(got, want) {
122 t.Fatalf("MarshalAppend modified prefix: got %v, want prefix %v", got, want)
155 t.Errorf("Marshal return non-empty, want empty")
205 want := []protoreflect.FieldNumber{
226 if !reflect.DeepEqual(got, want) {
227 t.Errorf("unexpected field marshal order:\ngot: %v\nwant: %v\nmessage:\n%v", got, want, m)
244 if got, want := len(b), proto.Size(m); got != want {
245 t.Fatalf("Size(m) = %v, but len(Marshal(m)) = %v", got, want)
250 if got, want := int64(len(m.Corecursive.OptionalBytes)), size; got != want {
251 t.Errorf("after round-trip marshal, got len(m.OptionalBytes) = %v, want %v", got, want)
267 t.Errorf("proto.Marshal() == nil: %v, want %v", isNil, !isValid)
275 t.Errorf("proto.MarshalOptions{}.Marshal() = %v, want %v", isNil, !isValid)