• Home
  • Raw
  • Download

Lines Matching +full:x +full:- +full:forwarded +full:- +full:proto

2 // Use of this source code is governed by a BSD-style
27 "github.com/google/go-cmp/cmp"
28 "github.com/google/go-cmp/cmp/cmpopts"
29 "github.com/google/go-cmp/cmp/internal/flags"
31 pb "github.com/google/go-cmp/cmp/internal/testprotos"
32 ts "github.com/google/go-cmp/cmp/internal/teststructs"
33 foo1 "github.com/google/go-cmp/cmp/internal/teststructs/foo1"
34 foo2 "github.com/google/go-cmp/cmp/internal/teststructs/foo2"
46 // mustParseGolden parses a file as a set of key-value pairs.
84 name := header[len(goldenHeaderPrefix) : len(header)-len("\n")]
117 x, y interface{} // Input values to compare member
120 wantPanic string // Sub-string of an expected panic message
157 gotDiff = cmp.Diff(tt.x, tt.y, tt.opts...)
176 …t.Fatalf("Diff:\ngot:\n%s\nwant:\n%s\ndiff: (-want +got)\n%s\nreason: %v", gotDiff, wantDiff, diff…
243 x: nil,
249 x: 1,
255 x: 1,
262 x: 1,
269 x: 1,
271 opts: []cmp.Option{cmp.Transformer("λ", func(x interface{}) interface{} { return x })},
276 x: 1,
279 cmp.Comparer(func(x, y int) bool { return true }),
280 cmp.Transformer("λ", func(x int) float64 { return float64(x) }),
286 x: 1,
290 return len(p) > 0 && p[len(p)-1].Type().Kind() == reflect.Int
292 cmp.Comparer(func(x, y int) bool { return true }),
293 cmp.Transformer("λ", func(x int) float64 { return float64(x) }),
304 x: struct{ A, B, C int }{1, 2, 3},
310 x: struct{ A, B, C int }{1, 2, 3},
316 x: struct{ a, b, c int }{1, 2, 3},
322 x: &struct{ A *int }{newInt(4)},
328 x: &struct{ A *int }{newInt(4)},
334 x: &struct{ A *int }{newInt(4)},
337 cmp.Comparer(func(x, y int) bool { return true }),
343 x: &struct{ A *int }{newInt(4)},
346 cmp.Comparer(func(x, y *int) bool { return x != nil && y != nil }),
352 x: &struct{ R *bytes.Buffer }{},
358 x: &struct{ R *bytes.Buffer }{new(bytes.Buffer)},
364 x: &struct{ R *bytes.Buffer }{new(bytes.Buffer)},
367 cmp.Comparer(func(x, y io.Reader) bool { return true }),
373 x: &struct{ R bytes.Buffer }{},
379 x: &struct{ R bytes.Buffer }{},
382 cmp.Comparer(func(x, y io.Reader) bool { return true }),
388 x: &struct{ R bytes.Buffer }{},
391 cmp.Transformer("Ref", func(x bytes.Buffer) *bytes.Buffer { return &x }),
392 cmp.Comparer(func(x, y io.Reader) bool { return true }),
398 x: []*regexp.Regexp{nil, regexp.MustCompile("a*b*c*")},
404 x: []*regexp.Regexp{nil, regexp.MustCompile("a*b*c*")},
406 opts: []cmp.Option{cmp.Comparer(func(x, y *regexp.Regexp) bool {
407 if x == nil || y == nil {
408 return x == nil && y == nil
410 return x.String() == y.String()
416 x: []*regexp.Regexp{nil, regexp.MustCompile("a*b*c*")},
418 opts: []cmp.Option{cmp.Comparer(func(x, y *regexp.Regexp) bool {
419 if x == nil || y == nil {
420 return x == nil && y == nil
422 return x.String() == y.String()
428 x: func() ***int {
444 x: func() ***int {
460 x: []int{1, 2, 3, 4, 5}[:3],
466 x: struct{ fmt.Stringer }{bytes.NewBufferString("hello")},
468 …opts: []cmp.Option{cmp.Comparer(func(x, y fmt.Stringer) bool { return x.String() == y.String(…
473 x: struct{ fmt.Stringer }{bytes.NewBufferString("hello")},
475 …opts: []cmp.Option{cmp.Comparer(func(x, y fmt.Stringer) bool { return x.String() == y.String(…
480 x: sha256.Sum256([]byte{'a'}),
486 x: new(fmt.Stringer),
492 x: makeTarHeaders('0'),
498 x: make([]int, 1000),
505 wantPanic: "non-deterministic or non-symmetric function detected",
506 reason: "non-deterministic comparer",
509 x: make([]int, 1000),
516 wantPanic: "non-deterministic or non-symmetric function detected",
517 reason: "non-deterministic filter",
520 x: []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
523 cmp.Comparer(func(x, y int) bool {
524 return x < y
527 wantPanic: "non-deterministic or non-symmetric function detected",
531 x: make([]string, 1000),
534 cmp.Transformer("λ", func(x string) int {
538 wantPanic: "non-deterministic function detected",
539 reason: "non-deterministic transformer",
542 x: make([]int, 10),
545 cmp.Transformer("λ", func(x int) float64 {
550 reason: "dynamic checks should not panic for non-reflexive comparisons",
553 x: map[*pb.Stringer]*pb.Stringer{{"hello"}: {"world"}},
559 x: []*pb.Stringer{{`multi\nline\nline\nline`}},
564 x: struct{ I Iface2 }{},
567 cmp.Comparer(func(x, y Iface1) bool {
568 return x == nil && y == nil
575 x: struct{ I Iface2 }{},
586 x: struct{ I Iface2 }{},
589 cmp.FilterValues(func(x, y Iface1) bool {
590 return x == nil && y == nil
597x: []interface{}{map[string]interface{}{"avg": 0.278, "hr": 65, "name": "Mark McGwire"}, m…
603 x: map[*int]string{
613 x: [2][]int{
637 x: [2]map[string]int{
661 x: namedWithUnexported{unexported: "x"},
667 x: struct{ a int }{},
673 x: struct{ s fmt.Stringer }{new(bytes.Buffer)},
682 t := p.Index(-1).Type()
683 vx, vy := p.Index(-1).Values()
684 pvx, pvy := p.Index(-2).Values()
702 x: io.EOF,
708 x: io.EOF,
738 x: uint8(0),
746 reason: "transform uint8 -> uint16 -> uint32 -> uint64",
749 x: 0,
759 x: []int{0, -5, 0, -1},
760 y: []int{1, 3, 0, -5},
763 func(x, y int) bool { return x+y >= 0 },
767 func(x, y int) bool { return x+y < 0 },
775 x: 0,
789 x: `{
796 "postalCode": "10021-3100",
802 "number": "212 555-4321"
805 "number": "646 555-4567"
807 "number": "123 456-7890",
814 "state":"NY","postalCode":"10021-3100"},"phoneNumbers":[{"type":"home",
815 "number":"212 555-1234"},{"type":"office","number":"646 555-4567"},{
816 "type":"mobile","number":"123 456-7890"}],"children":[],"spouse":null}`,
829x: StringBytes{String: "some\nmulti\nLine\nstring", Bytes: []byte("some\nmulti\nline\nbytes")},
836 reason: "string -> []string and []byte -> [][]byte transformer only applied once",
839 x: "a\nb\nc\n",
845 reason: "cyclic transformation from string -> []string -> string",
848 x: complex64(0),
851 cmp.Transformer("T1", func(x complex64) complex128 { return complex128(x) }),
852 cmp.Transformer("T2", func(x complex128) [2]float64 { return [2]float64{real(x), imag(x)} }),
853 cmp.Transformer("T3", func(x float64) complex64 { return complex64(complex(x, 0)) }),
856 reason: "cyclic transformation from complex64 -> complex128 -> [2]float64 -> complex64",
894 x: struct{ X fmt.Stringer }{struct{ fmt.Stringer }{nil}},
895 y: struct{ X fmt.Stringer }{bytes.NewBuffer(nil)},
900 x: struct{ X error }{struct{ error }{nil}},
901 y: struct{ X error }{errors.New("")},
906 x: foo1.Bar{},
912 x: newInt(0),
915 cmp.Comparer(func(x, y *int) bool { return x == y }),
921 x: struct{ I *int }{newInt(0)},
924 cmp.Comparer(func(x, y *int) bool { return x == y }),
930 x: []*int{newInt(0)},
933 cmp.Comparer(func(x, y *int) bool { return x == y }),
939 x: map[string]*int{"zero": newInt(0)},
942 cmp.Comparer(func(x, y *int) bool { return x == y }),
948 x: Stringer("hello"),
954 x: struct{ S fmt.Stringer }{Stringer("hello")},
960 x: []fmt.Stringer{Stringer("hello")},
966 x: map[string]fmt.Stringer{"zero": Stringer("hello")},
972 x: make([]int, 0, 5),
975 cmp.Comparer(func(x, y []int) bool { return cap(x) == cap(y) }),
981 x: map[interface{}]string{
994 x: map[interface{}]string{Stringer("hello"): "goodbye"},
1000 x: MyString("\xed\xa0\x80"),
1002 reason: "invalid UTF-8 should format as quoted string",
1005x: MyComposite{IntsA: []int8{11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 2…
1011x: MyComposite{IntsA: []int8{10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 2…
1017x: MyComposite{BytesA: []byte{10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, …
1026x: MyComposite{IntsA: []int8{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,…
1031 x: MyComposite{
1035 IntsA: []int8{-1, -2, -3},
1036 IntsB: []MyInt{-4, -5, -6},
1037 IntsC: MyInts{-7, -8, -9},
1049 IntsA: []int8{-3, -2, -1},
1050 IntsB: []MyInt{-6, -5, -4},
1051 IntsC: MyInts{-9, -8, -7},
1063x: MyComposite{BytesA: []byte("\xf3\x0f\x8a\xa4\xd3\x12R\t$\xbeX\x95A\xfd$fX\x8byT\xac\r\x…
1064 …\xb4\xab0 \xb6\xbd\\b4\x17\xb0\x00\xbbO~'G\x06\xf4.f\xfdc\xd7\x04ݷ0\xb7\xd1u-[]]\xf6\xb3haha~\x1dW…
1069x: MyComposite{StringB: MyString("readme.txt\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x…
1075x: MyComposite{BytesA: []byte(`{"firstName":"John","lastName":"Smith","isAlive":true,"age"…
1076 …"10021-3100"},"phoneNumbers":[{"type":"home","number":"212 555-1234"},{"type":"office","number":"6…
1081x: MyComposite{StringA: "aaa\nbbb\nccc\nddd\neee\nfff\nggg\nhhh\niii\njjj\nkkk\nlll\nmmm\n…
1084 reason: "use triple-quote syntax",
1087 x: []string{
1096 reason: "use triple-quote syntax for slices of strings",
1099 x: MyComposite{
1108 reason: "use triple-quote syntax for named types",
1111 x: []MyString{
1120 reason: "use triple-quote syntax for slices of named strings",
1123x: "aaa\nbbb\nccc\nddd\neee\nfff\nggg\r\nhhh\n\riii\njjj\nkkk\nlll\nmmm\nnnn\nooo\nppp\nqq…
1126 reason: "use triple-quote syntax",
1129x: "aaa\nbbb\nccc\nddd\neee\nfff\nggg\nhhh\niii\njjj\nkkk\nlll\nmmm\nnnn\nooo\nppp\nqqq\nR…
1132 reason: "avoid triple-quote syntax due to presence of ambiguous triple quotes",
1135x: "aaa\nbbb\nccc\n...\neee\nfff\nggg\nhhh\niii\njjj\nkkk\nlll\nmmm\nnnn\nooo\nppp\nqqq\nR…
1138 reason: "avoid triple-quote syntax due to presence of ambiguous ellipsis",
1141x: "aaa\nbbb\nccc\nddd\neee\nfff\nggg\nhhh\niii\njjj\nkkk\nlll\nmmm\nnnn\nooo\nppp\nqqq\nR…
1144 reason: "use triple-quote syntax",
1147x: "aaa\nbbb\nccc\n ddd\neee\nfff\nggg\nhhh\niii\njjj\nkkk\nlll\nmmm\nnnn\nooo\nppp\nqqq\n…
1150 reason: "avoid triple-quote syntax due to visual equivalence of differences",
1153 x: []fmt.Stringer{
1161 …opts: []cmp.Option{cmp.Comparer(func(x, y fmt.Stringer) bool { return x.String() == y.String(…
1163 reason: "multi-line String output should be formatted with triple quote",
1166x: []byte("\xcd====\x06\x1f\xc2\xcc\xc2-S=====\x1d\xdfa\xae\x98\x9fH======ǰ\xb7=======\xef…
1172x: "a\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk\nl\nm\nn\no\np\nq\nr\ns\nt\nu\nv\nw\nx\ny\nz\nA\nB\nC\…
1178 x: func() (out []struct{ S string }) {
1194 x: MyComposite{
1242 reason: "batched per-line diff desired since string looks like multi-line textual data",
1245 x: MyComposite{
1249 IntsA: []int8{-1, -2, -3},
1250 IntsB: []MyInt{-4, -5, -6},
1251 IntsC: MyInts{-7, -8, -9},
1261 reason: "batched diffing for non-nil slices and nil slices",
1264 x: MyComposite{
1283 x: map[*[]byte]int{func() *[]byte {
1294x: struct{ X interface{} }{"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit a…
1296 …y: struct{ X interface{} }{"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit …
1300x: struct{ X interface{} }{[]byte("Lorem ipsum dolor sit amet, consectetur adipiscing elit. N…
1301 …y: struct{ X interface{} }{[]byte("Lorem ipsum dolor sit amet, consectetur adipiscing elit. N…
1305x: struct{ X interface{} }{[1]string{"Lorem ipsum dolor sit amet, consectetur adipiscing elit…
1306 …y: struct{ X interface{} }{[1]string{"Lorem ipsum dolor sit amet, consectetur adipiscing elit…
1310x: "org-4747474747474747,bucket-4242424242424242:m,tag1=a,tag2=aa,#=_value _value=2 11\torg-4…
1311-4747474747474747,bucket-4242424242424242:m,tag1=a,tag2=aa _value=2 11\torg-4747474747474747,bucke…
1315x: "org-4747474747474747,bucket-4242424242424242:m,tag1=a,tag2=aa,\xff=_value _value=2 11\nor…
1316-4747474747474747,bucket-4242424242424242:m,tag1=a,tag2=aa _value=2 11\norg-4747474747474747,bucke…
1317 reason: "the presence of a few invalid UTF-8 characters should not prevent printing this as text",
1320x: "d5c14bdf6bac81c27afc5429500ed750\n25483503b557c606dad4f144d27ae10b\n90bdbcdbb6ea7156068e3…
1325 x: struct{ X []byte }{[]byte("hello, world!")},
1326 y: struct{ X []byte }{},
1330 x: struct{ X []byte }{[]byte("\xde\xad\xbe\xef")},
1331 y: struct{ X []byte }{},
1335 x: struct{ X MyBytes }{MyBytes("hello, world!")},
1336 y: struct{ X MyBytes }{},
1340 x: struct{ X MyBytes }{MyBytes("\xde\xad\xbe\xef")},
1341 y: struct{ X MyBytes }{},
1345 x: `{
1355 reason: "short multiline JSON should prefer triple-quoted string diff as it is more readable",
1358 x: func() *string {
1369 x: func() *string {
1380 x: map[string]interface{}{"key": int(0)},
1385 x: struct{ X interface{} }{int(0)},
1386 y: struct{ X interface{} }{uint(0)},
1390 x: [][]byte{
1399 x: [][]byte{
1408 x: `[
1422 …reason: "should use line-based diffing since byte-based diffing is unreadable due to heavy amounts…
1521 x: ts.ParentStructA{},
1527 x: ts.ParentStructA{},
1536 x: createStructA(0),
1545 x: createStructA(0),
1554 x: createStructA(0),
1563 x: ts.ParentStructB{},
1572 x: ts.ParentStructB{},
1582 x: createStructB(0),
1591 x: createStructB(0),
1600 x: createStructB(0),
1609 x: ts.ParentStructC{},
1615 x: ts.ParentStructC{},
1624 x: createStructC(0),
1633 x: createStructC(0),
1642 x: createStructC(0),
1651 x: ts.ParentStructD{},
1660 x: ts.ParentStructD{},
1670 x: createStructD(0),
1679 x: createStructD(0),
1688 x: createStructD(0),
1697 x: ts.ParentStructE{},
1706 x: ts.ParentStructE{},
1716 x: createStructE(0),
1725 x: createStructE(0),
1734 x: createStructE(0),
1743 x: createStructE(0),
1752 x: ts.ParentStructF{},
1761 x: ts.ParentStructF{},
1771 x: createStructF(0),
1780 x: createStructF(0),
1789 x: createStructF(0),
1798 x: createStructF(0),
1807 x: ts.ParentStructG{},
1813 x: ts.ParentStructG{},
1822 x: createStructG(0),
1831 x: createStructG(0),
1840 x: createStructG(0),
1849 x: ts.ParentStructH{},
1855 x: createStructH(0),
1861 x: ts.ParentStructH{},
1870 x: createStructH(0),
1879 x: createStructH(0),
1888 x: createStructH(0),
1897 x: ts.ParentStructI{},
1903 x: ts.ParentStructI{},
1912 x: createStructI(0),
1921 x: createStructI(0),
1930 x: createStructI(0),
1939 x: createStructI(0),
1948 x: createStructI(0),
1957 x: ts.ParentStructJ{},
1963 x: ts.ParentStructJ{},
1972 x: ts.ParentStructJ{},
1981 x: createStructJ(0),
1990 x: createStructJ(0),
1999 x: createStructJ(0),
2013 // but only a non-pointer value is present in the struct.
2019 t := p[len(p)-1].Type()
2029 }, cmp.Transformer("Addr", func(x interface{}) interface{} {
2030 v := reflect.ValueOf(x)
2041 x: ts.StructA{X: "NotEqual"},
2042 y: ts.StructA{X: "not_equal"},
2047 x: &ts.StructA{X: "NotEqual"},
2048 y: &ts.StructA{X: "not_equal"},
2053 x: ts.StructB{X: "NotEqual"},
2054 y: ts.StructB{X: "not_equal"},
2059 x: ts.StructB{X: "NotEqual"},
2060 y: ts.StructB{X: "not_equal"},
2066 x: &ts.StructB{X: "NotEqual"},
2067 y: &ts.StructB{X: "not_equal"},
2072 x: ts.StructC{X: "NotEqual"},
2073 y: ts.StructC{X: "not_equal"},
2078 x: &ts.StructC{X: "NotEqual"},
2079 y: &ts.StructC{X: "not_equal"},
2084 x: ts.StructD{X: "NotEqual"},
2085 y: ts.StructD{X: "not_equal"},
2090 x: ts.StructD{X: "NotEqual"},
2091 y: ts.StructD{X: "not_equal"},
2097 x: &ts.StructD{X: "NotEqual"},
2098 y: &ts.StructD{X: "not_equal"},
2103 x: ts.StructE{X: "NotEqual"},
2104 y: ts.StructE{X: "not_equal"},
2109 x: ts.StructE{X: "NotEqual"},
2110 y: ts.StructE{X: "not_equal"},
2116 x: &ts.StructE{X: "NotEqual"},
2117 y: &ts.StructE{X: "not_equal"},
2122 x: ts.StructF{X: "NotEqual"},
2123 y: ts.StructF{X: "not_equal"},
2128 x: &ts.StructF{X: "NotEqual"},
2129 y: &ts.StructF{X: "not_equal"},
2134 x: ts.StructA1{StructA: ts.StructA{X: "NotEqual"}, X: "equal"},
2135 y: ts.StructA1{StructA: ts.StructA{X: "not_equal"}, X: "equal"},
2137 reason: "Equal method on StructA value called with equal X field",
2140 x: ts.StructA1{StructA: ts.StructA{X: "NotEqual"}, X: "NotEqual"},
2141 y: ts.StructA1{StructA: ts.StructA{X: "not_equal"}, X: "not_equal"},
2143 reason: "Equal method on StructA value called, but inequal X field",
2146 x: &ts.StructA1{StructA: ts.StructA{X: "NotEqual"}, X: "equal"},
2147 y: &ts.StructA1{StructA: ts.StructA{X: "not_equal"}, X: "equal"},
2149 reason: "Equal method on StructA value called with equal X field",
2152 x: &ts.StructA1{StructA: ts.StructA{X: "NotEqual"}, X: "NotEqual"},
2153 y: &ts.StructA1{StructA: ts.StructA{X: "not_equal"}, X: "not_equal"},
2155 reason: "Equal method on StructA value called, but inequal X field",
2158 x: ts.StructB1{StructB: ts.StructB{X: "NotEqual"}, X: "equal"},
2159 y: ts.StructB1{StructB: ts.StructB{X: "not_equal"}, X: "equal"},
2162 …reason: "Equal method on StructB pointer called due to shallow copy transform with equal X fiel…
2165 x: ts.StructB1{StructB: ts.StructB{X: "NotEqual"}, X: "NotEqual"},
2166 y: ts.StructB1{StructB: ts.StructB{X: "not_equal"}, X: "not_equal"},
2169 …reason: "Equal method on StructB pointer called due to shallow copy transform, but inequal X fi…
2172 x: &ts.StructB1{StructB: ts.StructB{X: "NotEqual"}, X: "equal"},
2173 y: &ts.StructB1{StructB: ts.StructB{X: "not_equal"}, X: "equal"},
2176 …reason: "Equal method on StructB pointer called due to shallow copy transform with equal X fiel…
2179 x: &ts.StructB1{StructB: ts.StructB{X: "NotEqual"}, X: "NotEqual"},
2180 y: &ts.StructB1{StructB: ts.StructB{X: "not_equal"}, X: "not_equal"},
2183 …reason: "Equal method on StructB pointer called due to shallow copy transform, but inequal X fi…
2186 x: ts.StructC1{StructC: ts.StructC{X: "NotEqual"}, X: "NotEqual"},
2187 y: ts.StructC1{StructC: ts.StructC{X: "not_equal"}, X: "not_equal"},
2192 x: &ts.StructC1{StructC: ts.StructC{X: "NotEqual"}, X: "NotEqual"},
2193 y: &ts.StructC1{StructC: ts.StructC{X: "not_equal"}, X: "not_equal"},
2198 x: ts.StructD1{StructD: ts.StructD{X: "NotEqual"}, X: "NotEqual"},
2199 y: ts.StructD1{StructD: ts.StructD{X: "not_equal"}, X: "not_equal"},
2204 x: ts.StructD1{StructD: ts.StructD{X: "NotEqual"}, X: "NotEqual"},
2205 y: ts.StructD1{StructD: ts.StructD{X: "not_equal"}, X: "not_equal"},
2211 x: &ts.StructD1{StructD: ts.StructD{X: "NotEqual"}, X: "NotEqual"},
2212 y: &ts.StructD1{StructD: ts.StructD{X: "not_equal"}, X: "not_equal"},
2217 x: ts.StructE1{StructE: ts.StructE{X: "NotEqual"}, X: "NotEqual"},
2218 y: ts.StructE1{StructE: ts.StructE{X: "not_equal"}, X: "not_equal"},
2223 x: ts.StructE1{StructE: ts.StructE{X: "NotEqual"}, X: "NotEqual"},
2224 y: ts.StructE1{StructE: ts.StructE{X: "not_equal"}, X: "not_equal"},
2230 x: &ts.StructE1{StructE: ts.StructE{X: "NotEqual"}, X: "NotEqual"},
2231 y: &ts.StructE1{StructE: ts.StructE{X: "not_equal"}, X: "not_equal"},
2236 x: ts.StructF1{StructF: ts.StructF{X: "NotEqual"}, X: "NotEqual"},
2237 y: ts.StructF1{StructF: ts.StructF{X: "not_equal"}, X: "not_equal"},
2242 x: &ts.StructF1{StructF: ts.StructF{X: "NotEqual"}, X: "NotEqual"},
2243 y: &ts.StructF1{StructF: ts.StructF{X: "not_equal"}, X: "not_equal"},
2248 x: ts.StructA2{StructA: &ts.StructA{X: "NotEqual"}, X: "equal"},
2249 y: ts.StructA2{StructA: &ts.StructA{X: "not_equal"}, X: "equal"},
2251 reason: "Equal method on StructA pointer called with equal X field",
2254 x: ts.StructA2{StructA: &ts.StructA{X: "NotEqual"}, X: "NotEqual"},
2255 y: ts.StructA2{StructA: &ts.StructA{X: "not_equal"}, X: "not_equal"},
2257 reason: "Equal method on StructA pointer called, but inequal X field",
2260 x: &ts.StructA2{StructA: &ts.StructA{X: "NotEqual"}, X: "equal"},
2261 y: &ts.StructA2{StructA: &ts.StructA{X: "not_equal"}, X: "equal"},
2263 reason: "Equal method on StructA pointer called with equal X field",
2266 x: &ts.StructA2{StructA: &ts.StructA{X: "NotEqual"}, X: "NotEqual"},
2267 y: &ts.StructA2{StructA: &ts.StructA{X: "not_equal"}, X: "not_equal"},
2269 reason: "Equal method on StructA pointer called, but inequal X field",
2272 x: ts.StructB2{StructB: &ts.StructB{X: "NotEqual"}, X: "equal"},
2273 y: ts.StructB2{StructB: &ts.StructB{X: "not_equal"}, X: "equal"},
2275 reason: "Equal method on StructB pointer called with equal X field",
2278 x: ts.StructB2{StructB: &ts.StructB{X: "NotEqual"}, X: "NotEqual"},
2279 y: ts.StructB2{StructB: &ts.StructB{X: "not_equal"}, X: "not_equal"},
2281 reason: "Equal method on StructB pointer called, but inequal X field",
2284 x: &ts.StructB2{StructB: &ts.StructB{X: "NotEqual"}, X: "equal"},
2285 y: &ts.StructB2{StructB: &ts.StructB{X: "not_equal"}, X: "equal"},
2287 reason: "Equal method on StructB pointer called with equal X field",
2290 x: &ts.StructB2{StructB: &ts.StructB{X: "NotEqual"}, X: "NotEqual"},
2291 y: &ts.StructB2{StructB: &ts.StructB{X: "not_equal"}, X: "not_equal"},
2293 reason: "Equal method on StructB pointer called, but inequal X field",
2296 x: ts.StructC2{StructC: &ts.StructC{X: "NotEqual"}, X: "NotEqual"},
2297 y: ts.StructC2{StructC: &ts.StructC{X: "not_equal"}, X: "not_equal"},
2299 reason: "Equal method called on StructC2 value due to forwarded StructC pointer",
2302 x: &ts.StructC2{StructC: &ts.StructC{X: "NotEqual"}, X: "NotEqual"},
2303 y: &ts.StructC2{StructC: &ts.StructC{X: "not_equal"}, X: "not_equal"},
2305 reason: "Equal method called on StructC2 pointer due to forwarded StructC pointer",
2308 x: ts.StructD2{StructD: &ts.StructD{X: "NotEqual"}, X: "NotEqual"},
2309 y: ts.StructD2{StructD: &ts.StructD{X: "not_equal"}, X: "not_equal"},
2311 reason: "Equal method called on StructD2 value due to forwarded StructD pointer",
2314 x: &ts.StructD2{StructD: &ts.StructD{X: "NotEqual"}, X: "NotEqual"},
2315 y: &ts.StructD2{StructD: &ts.StructD{X: "not_equal"}, X: "not_equal"},
2317 reason: "Equal method called on StructD2 pointer due to forwarded StructD pointer",
2320 x: ts.StructE2{StructE: &ts.StructE{X: "NotEqual"}, X: "NotEqual"},
2321 y: ts.StructE2{StructE: &ts.StructE{X: "not_equal"}, X: "not_equal"},
2323 reason: "Equal method called on StructE2 value due to forwarded StructE pointer",
2326 x: &ts.StructE2{StructE: &ts.StructE{X: "NotEqual"}, X: "NotEqual"},
2327 y: &ts.StructE2{StructE: &ts.StructE{X: "not_equal"}, X: "not_equal"},
2329 reason: "Equal method called on StructE2 pointer due to forwarded StructE pointer",
2332 x: ts.StructF2{StructF: &ts.StructF{X: "NotEqual"}, X: "NotEqual"},
2333 y: ts.StructF2{StructF: &ts.StructF{X: "not_equal"}, X: "not_equal"},
2335 reason: "Equal method called on StructF2 value due to forwarded StructF pointer",
2338 x: &ts.StructF2{StructF: &ts.StructF{X: "NotEqual"}, X: "NotEqual"},
2339 y: &ts.StructF2{StructF: &ts.StructF{X: "not_equal"}, X: "not_equal"},
2341 reason: "Equal method called on StructF2 pointer due to forwarded StructF pointer",
2344 x: ts.StructNo{X: "NotEqual"},
2345 y: ts.StructNo{X: "not_equal"},
2350 x: ts.AssignA(func() int { return 0 }),
2356 x: ts.AssignB(struct{ A int }{0}),
2362 x: ts.AssignC(make(chan bool)),
2368 x: ts.AssignD(make(chan bool)),
2454 type XY struct{ x, y interface{} }
2463 x := new(P)
2464 *x = x
2467 return XY{x, y}
2470 reason: "equal pair of single-node pointers",
2474 x := new(P)
2475 *x = x
2479 return XY{x, y1}
2482 reason: "inequal pair of single-node and double-node pointers",
2486 x := S{nil}
2487 x[0] = x
2490 return XY{x, y}
2493 reason: "equal pair of single-node slices",
2497 x := S{nil}
2498 x[0] = x
2502 return XY{x, y1}
2505 reason: "inequal pair of single-node and double node slices",
2509 x := M{0: nil}
2510 x[0] = x
2513 return XY{x, y}
2516 reason: "equal pair of single-node maps",
2520 x := M{0: nil}
2521 x[0] = x
2525 return XY{x, y1}
2528 reason: "inequal pair of single-node and double-node maps",
2537 x := makeGraph()
2542 return XY{x, y}
2549 x := makeGraph()
2551 x["Buzz"].Bravos["BuzzBarBravo"] = &CycleBravo{
2555 return XY{x, y}
2562 x: tt.in.x,
2607 Args: &pb.MetaData{Stringer: pb.Stringer{X: "metadata"}},
2632 x: ts.Eagle{Slaps: []ts.Slap{{
2633 Args: &pb.MetaData{Stringer: pb.Stringer{X: "metadata"}},
2636 Args: &pb.MetaData{Stringer: pb.Stringer{X: "metadata"}},
2642 x: ts.Eagle{Slaps: []ts.Slap{{
2643 Args: &pb.MetaData{Stringer: pb.Stringer{X: "metadata"}},
2646 Args: &pb.MetaData{Stringer: pb.Stringer{X: "metadata"}},
2653 x: ts.Eagle{Slaps: []ts.Slap{{}, {}, {}, {}, {
2654 Args: &pb.MetaData{Stringer: pb.Stringer{X: "metadata"}},
2657 Args: &pb.MetaData{Stringer: pb.Stringer{X: "metadata2"}},
2664 x: createEagle(),
2671 x: func() ts.Eagle {
2705 equalDish := cmp.Comparer(func(x, y *ts.Dish) bool {
2706 if x == nil || y == nil {
2707 return x == nil && y == nil
2709 px, err1 := x.Proto()
2710 py, err2 := y.Proto()
2721 {Stringer: pb.Stringer{X: "germ1"}},
2724 {Stringer: pb.Stringer{X: "germ2"}},
2725 {Stringer: pb.Stringer{X: "germ3"}},
2726 {Stringer: pb.Stringer{X: "germ4"}},
2730 13: {Stringer: pb.Stringer{X: "germ13"}},
2731 21: {Stringer: pb.Stringer{X: "germ21"}},
2736 2: ts.CreateDish(&pb.Dish{Stringer: pb.Stringer{X: "dish"}}, nil),
2747 x: createBatch(),
2753 x: createBatch(),
2760 x: createBatch(),
2772 x: createBatch(),
2784 x: func() ts.GermBatch {
2809 transformProtos := cmp.Transformer("λ", func(x pb.Dirt) *pb.Dirt {
2810 return &x
2813 equalTable := cmp.Comparer(func(x, y ts.Table) bool {
2814 tx, ok1 := x.(*ts.MockTable)
2826 d.Proto = pb.Dirt{Stringer: pb.Stringer{X: "proto"}}
2828 "harry": {Stringer: pb.Stringer{X: "potter"}},
2829 "albus": {Stringer: pb.Stringer{X: "dumbledore"}},
2837 x: createDirt(),
2843 x: createDirt(),
2850 x: createDirt(),
2857 x: func() ts.Dirt {
2860 d.Proto = pb.Dirt{Stringer: pb.Stringer{X: "blah"}}
2867 "harry": {Stringer: pb.Stringer{X: "otter"}},
2886 transformProtos := cmp.Transformer("λ", func(x pb.Restrictions) *pb.Restrictions {
2887 return &x
2900 hq.SetMetaData(&pb.MetaData{Stringer: pb.Stringer{X: "metadata"}})
2917 x: createCartel(),
2923 x: createCartel(),
2930 x: createCartel(),
2937 x: func() ts.Cartel {
2983 bx := append(append(make([]byte, ts.size/2), 'x'), make([]byte, ts.size/2)...)