1 <<< TestDiff/Comparer/StructInequal
2 struct{ A int; B int; C int }{
8 >>> TestDiff/Comparer/StructInequal
9 <<< TestDiff/Comparer/PointerStructInequal
14 >>> TestDiff/Comparer/PointerStructInequal
15 <<< TestDiff/Comparer/StructNestedPointerInequal
16 &struct{ R *bytes.Buffer }{
20 >>> TestDiff/Comparer/StructNestedPointerInequal
21 <<< TestDiff/Comparer/RegexpInequal
27 >>> TestDiff/Comparer/RegexpInequal
28 <<< TestDiff/Comparer/TriplePointerInequal
33 >>> TestDiff/Comparer/TriplePointerInequal
34 <<< TestDiff/Comparer/StringerInequal
35 struct{ fmt.Stringer }(
39 >>> TestDiff/Comparer/StringerInequal
40 <<< TestDiff/Comparer/DifferingHash
42 - 0x0c, 0xc1, 0x75, 0xb9, 0xc0, 0xf1, 0xb6, 0xa8, 0x31, 0xc3, 0x99, 0xe2, 0x69, 0x77, 0x26, 0x61,
43 + 0x92, 0xeb, 0x5f, 0xfe, 0xe6, 0xae, 0x2f, 0xec, 0x3a, 0xd7, 0x1c, 0x77, 0x75, 0x31, 0x57, 0x8f,
45 >>> TestDiff/Comparer/DifferingHash
46 <<< TestDiff/Comparer/NilStringer
50 >>> TestDiff/Comparer/NilStringer
51 <<< TestDiff/Comparer/TarHeaders
54 ... // 4 identical fields
56 ModTime: s"2009-11-10 23:00:00 +0000 UTC",
61 ... // 6 identical fields
64 ... // 4 identical fields
66 ModTime: s"2009-11-11 00:00:00 +0000 UTC",
71 ... // 6 identical fields
74 ... // 4 identical fields
76 ModTime: s"2009-11-11 01:00:00 +0000 UTC",
81 ... // 6 identical fields
84 ... // 4 identical fields
86 ModTime: s"2009-11-11 02:00:00 +0000 UTC",
91 ... // 6 identical fields
94 ... // 4 identical fields
96 ModTime: s"2009-11-11 03:00:00 +0000 UTC",
101 ... // 6 identical fields
104 >>> TestDiff/Comparer/TarHeaders
105 <<< TestDiff/Comparer/IrreflexiveComparison
107 - Inverse(λ, float64(NaN)),
108 + Inverse(λ, float64(NaN)),
109 - Inverse(λ, float64(NaN)),
110 + Inverse(λ, float64(NaN)),
111 - Inverse(λ, float64(NaN)),
112 + Inverse(λ, float64(NaN)),
113 - Inverse(λ, float64(NaN)),
114 + Inverse(λ, float64(NaN)),
115 - Inverse(λ, float64(NaN)),
116 + Inverse(λ, float64(NaN)),
117 - Inverse(λ, float64(NaN)),
118 + Inverse(λ, float64(NaN)),
119 - Inverse(λ, float64(NaN)),
120 + Inverse(λ, float64(NaN)),
121 - Inverse(λ, float64(NaN)),
122 + Inverse(λ, float64(NaN)),
123 - Inverse(λ, float64(NaN)),
124 + Inverse(λ, float64(NaN)),
125 - Inverse(λ, float64(NaN)),
126 + Inverse(λ, float64(NaN)),
128 >>> TestDiff/Comparer/IrreflexiveComparison
129 <<< TestDiff/Comparer/StringerMapKey
130 map[*testprotos.Stringer]*testprotos.Stringer(
131 - {s"hello": s"world"},
134 >>> TestDiff/Comparer/StringerMapKey
135 <<< TestDiff/Comparer/StringerBacktick
137 - []*testprotos.Stringer{s`multi\nline\nline\nline`},
139 >>> TestDiff/Comparer/StringerBacktick
140 <<< TestDiff/Comparer/DynamicMap
142 map[string]interface{}{
143 "avg": float64(0.278),
146 "name": string("Mark McGwire"),
148 map[string]interface{}{
149 "avg": float64(0.288),
152 "name": string("Sammy Sosa"),
155 >>> TestDiff/Comparer/DynamicMap
156 <<< TestDiff/Comparer/MapKeyPointer
158 - &⟪0xdeadf00f⟫0: "hello",
159 + &⟪0xdeadf00f⟫0: "world",
161 >>> TestDiff/Comparer/MapKeyPointer
162 <<< TestDiff/Comparer/IgnoreSliceElements
166 ... // 6 ignored and 1 identical elements
169 ... // 3 ignored elements
172 >>> TestDiff/Comparer/IgnoreSliceElements
173 <<< TestDiff/Comparer/IgnoreMapEntries
175 {"KEEP3": 3, "keep1": 1, "keep2": 2, ...},
177 ... // 2 ignored entries
182 >>> TestDiff/Comparer/IgnoreMapEntries
183 <<< TestDiff/Transformer/Uints
184 uint8(Inverse(λ, uint16(Inverse(λ, uint32(Inverse(λ, uint64(
188 >>> TestDiff/Transformer/Uints
189 <<< TestDiff/Transformer/Filtered
191 Inverse(λ, int64(0)),
192 - Inverse(λ, int64(-5)),
193 + Inverse(λ, int64(3)),
194 Inverse(λ, int64(0)),
195 - Inverse(λ, int64(-1)),
196 + Inverse(λ, int64(-5)),
198 >>> TestDiff/Transformer/Filtered
199 <<< TestDiff/Transformer/DisjointOutput
200 int(Inverse(λ, interface{}(
204 >>> TestDiff/Transformer/DisjointOutput
205 <<< TestDiff/Transformer/JSON
206 string(Inverse(ParseJSON, map[string]interface{}{
207 "address": map[string]interface{}{
208 - "city": string("Los Angeles"),
209 + "city": string("New York"),
210 "postalCode": string("10021-3100"),
211 - "state": string("CA"),
212 + "state": string("NY"),
213 "streetAddress": string("21 2nd Street"),
216 "children": []interface{}{},
217 "firstName": string("John"),
218 "isAlive": bool(true),
219 "lastName": string("Smith"),
220 "phoneNumbers": []interface{}{
221 map[string]interface{}{
222 - "number": string("212 555-4321"),
223 + "number": string("212 555-1234"),
224 "type": string("home"),
226 map[string]interface{}{"number": string("646 555-4567"), "type": string("office")},
227 map[string]interface{}{"number": string("123 456-7890"), "type": string("mobile")},
231 >>> TestDiff/Transformer/JSON
232 <<< TestDiff/Transformer/AcyclicString
233 cmp_test.StringBytes{
234 String: Inverse(SplitString, []string{
241 Bytes: []uint8(Inverse(SplitBytes, [][]uint8{
242 {0x73, 0x6f, 0x6d, 0x65},
243 {0x6d, 0x75, 0x6c, 0x74, ...},
244 {0x6c, 0x69, 0x6e, 0x65},
250 ... // 2 identical elements
254 >>> TestDiff/Transformer/AcyclicString
255 <<< TestDiff/Reporter/PanicStringer
256 struct{ X fmt.Stringer }{
257 - X: struct{ fmt.Stringer }{},
260 >>> TestDiff/Reporter/PanicStringer
261 <<< TestDiff/Reporter/PanicError
263 - X: struct{ error }{},
266 >>> TestDiff/Reporter/PanicError
267 <<< TestDiff/Reporter/AmbiguousType
269 - "github.com/google/go-cmp/cmp/internal/teststructs/foo1".Bar{},
270 + "github.com/google/go-cmp/cmp/internal/teststructs/foo2".Bar{},
272 >>> TestDiff/Reporter/AmbiguousType
273 <<< TestDiff/Reporter/AmbiguousPointer
278 >>> TestDiff/Reporter/AmbiguousPointer
279 <<< TestDiff/Reporter/AmbiguousPointerStruct
284 >>> TestDiff/Reporter/AmbiguousPointerStruct
285 <<< TestDiff/Reporter/AmbiguousPointerSlice
290 >>> TestDiff/Reporter/AmbiguousPointerSlice
291 <<< TestDiff/Reporter/AmbiguousPointerMap
293 - "zero": &⟪0xdeadf00f⟫0,
294 + "zero": &⟪0xdeadf00f⟫0,
296 >>> TestDiff/Reporter/AmbiguousPointerMap
297 <<< TestDiff/Reporter/AmbiguousStringer
299 - cmp_test.Stringer("hello"),
300 + &cmp_test.Stringer("hello"),
302 >>> TestDiff/Reporter/AmbiguousStringer
303 <<< TestDiff/Reporter/AmbiguousStringerStruct
304 struct{ S fmt.Stringer }{
305 - S: cmp_test.Stringer("hello"),
306 + S: &cmp_test.Stringer("hello"),
308 >>> TestDiff/Reporter/AmbiguousStringerStruct
309 <<< TestDiff/Reporter/AmbiguousStringerSlice
311 - cmp_test.Stringer("hello"),
312 + &cmp_test.Stringer("hello"),
314 >>> TestDiff/Reporter/AmbiguousStringerSlice
315 <<< TestDiff/Reporter/AmbiguousStringerMap
316 map[string]fmt.Stringer{
317 - "zero": cmp_test.Stringer("hello"),
318 + "zero": &cmp_test.Stringer("hello"),
320 >>> TestDiff/Reporter/AmbiguousStringerMap
321 <<< TestDiff/Reporter/AmbiguousSliceHeader
323 - ⟪ptr:0xdeadf00f, len:0, cap:5⟫{},
324 + ⟪ptr:0xdeadf00f, len:0, cap:1000⟫{},
326 >>> TestDiff/Reporter/AmbiguousSliceHeader
327 <<< TestDiff/Reporter/AmbiguousStringerMapKey
328 map[interface{}]string{
330 + &⟪0xdeadf00f⟫"github.com/google/go-cmp/cmp_test".Stringer("hello"): "goodbye",
331 - "github.com/google/go-cmp/cmp_test".Stringer("hello"): "goodbye",
332 - "github.com/google/go-cmp/cmp/internal/teststructs/foo1".Bar{S: "fizz"}: "buzz",
333 + "github.com/google/go-cmp/cmp/internal/teststructs/foo2".Bar{S: "fizz"}: "buzz",
335 >>> TestDiff/Reporter/AmbiguousStringerMapKey
336 <<< TestDiff/Reporter/NonAmbiguousStringerMapKey
337 map[interface{}]string{
339 - s"hello": "goodbye",
341 >>> TestDiff/Reporter/NonAmbiguousStringerMapKey
342 <<< TestDiff/Reporter/InvalidUTF8
344 - cmp_test.MyString("\xed\xa0\x80"),
346 >>> TestDiff/Reporter/InvalidUTF8
347 <<< TestDiff/Reporter/UnbatchedSlice
348 cmp_test.MyComposite{
349 ... // 3 identical fields
359 ... // 15 identical elements
363 ... // 6 identical fields
365 >>> TestDiff/Reporter/UnbatchedSlice
366 <<< TestDiff/Reporter/BatchedSlice
367 cmp_test.MyComposite{
368 ... // 3 identical fields
372 - 10, 11, 12, 13, 14, 15, 16,
373 + 12, 29, 13, 27, 22, 23,
375 - 22, 23, 24, 25, 26, 27, 28, 29,
376 + 10, 26, 16, 25, 28, 11, 15, 24, 14,
380 ... // 6 identical fields
382 >>> TestDiff/Reporter/BatchedSlice
383 <<< TestDiff/Reporter/BatchedWithComparer
384 cmp_test.MyComposite{
388 - 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, // -|.......|
389 + 0x0c, 0x1d, 0x0d, 0x1b, 0x16, 0x17, // +|......|
390 0x11, 0x12, 0x13, 0x14, 0x15, // |.....|
391 - 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, // -|........|
392 + 0x0a, 0x1a, 0x10, 0x19, 0x1c, 0x0b, 0x0f, 0x18, 0x0e, // +|.........|
396 ... // 9 identical fields
398 >>> TestDiff/Reporter/BatchedWithComparer
399 <<< TestDiff/Reporter/BatchedLong
401 - cmp_test.MyComposite{IntsA: []int8{0, 1, 2, 3, 4, 5, 6, 7, ...}},
403 >>> TestDiff/Reporter/BatchedLong
404 <<< TestDiff/Reporter/BatchedNamedAndUnnamed
405 cmp_test.MyComposite{
409 - 0x01, 0x02, 0x03, // -|...|
410 + 0x03, 0x02, 0x01, // +|...|
412 BytesB: []cmp_test.MyByte{
416 BytesC: cmp_test.MyBytes{
417 - 0x07, 0x08, 0x09, // -|...|
418 + 0x09, 0x08, 0x07, // +|...|
424 IntsB: []cmp_test.MyInt{
428 IntsC: cmp_test.MyInts{
436 UintsB: []cmp_test.MyUint{
440 UintsC: cmp_test.MyUints{
448 FloatsB: []cmp_test.MyFloat{
452 FloatsC: cmp_test.MyFloats{
457 >>> TestDiff/Reporter/BatchedNamedAndUnnamed
458 <<< TestDiff/Reporter/BinaryHexdump
459 cmp_test.MyComposite{
463 0xf3, 0x0f, 0x8a, 0xa4, 0xd3, 0x12, 0x52, 0x09, 0x24, 0xbe, // |......R.$.|
464 - 0x58, 0x95, 0x41, 0xfd, 0x24, 0x66, 0x58, 0x8b, 0x79, // -|X.A.$fX.y|
465 0x54, 0xac, 0x0d, 0xd8, 0x71, 0x77, 0x70, 0x20, 0x6a, 0x5c, 0x73, 0x7f, 0x8c, 0x17, 0x55, 0xc0, // |T...qwp j\s...U.|
466 0x34, 0xce, 0x6e, 0xf7, 0xaa, 0x47, 0xee, 0x32, 0x9d, 0xc5, 0xca, 0x1e, 0x58, 0xaf, 0x8f, 0x27, // |4.n..G.2....X..'|
467 0xf3, 0x02, 0x4a, 0x90, 0xed, 0x69, 0x2e, 0x70, 0x32, 0xb4, 0xab, 0x30, 0x20, 0xb6, 0xbd, 0x5c, // |..J..i.p2..0 ..\|
468 0x62, 0x34, 0x17, 0xb0, 0x00, 0xbb, 0x4f, 0x7e, 0x27, 0x47, 0x06, 0xf4, 0x2e, 0x66, 0xfd, 0x63, // |b4....O~'G...f.c|
469 0xd7, 0x04, 0xdd, 0xb7, 0x30, 0xb7, 0xd1, // |....0..|
470 - 0x55, 0x7e, 0x7b, 0xf6, 0xb3, 0x7e, 0x1d, 0x57, 0x69, // -|U~{..~.Wi|
471 + 0x75, 0x2d, 0x5b, 0x5d, 0x5d, 0xf6, 0xb3, 0x68, 0x61, 0x68, 0x61, 0x7e, 0x1d, 0x57, 0x49, // +|u-[]]..haha~.WI|
472 0x20, 0x9e, 0xbc, 0xdf, 0xe1, 0x4d, 0xa9, 0xef, 0xa2, 0xd2, 0xed, 0xb4, 0x47, 0x78, 0xc9, 0xc9, // | ....M......Gx..|
473 0x27, 0xa4, 0xc6, 0xce, 0xec, 0x44, 0x70, 0x5d, // |'....Dp]|
477 ... // 9 identical fields
479 >>> TestDiff/Reporter/BinaryHexdump
480 <<< TestDiff/Reporter/StringHexdump
481 cmp_test.MyComposite{
483 StringB: cmp_test.MyString{
484 - 0x72, 0x65, 0x61, 0x64, 0x6d, 0x65, // -|readme|
485 + 0x67, 0x6f, 0x70, 0x68, 0x65, 0x72, // +|gopher|
486 0x2e, 0x74, 0x78, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // |.txt............|
487 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // |................|
488 ... // 64 identical bytes
489 0x30, 0x30, 0x36, 0x30, 0x30, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x00, 0x30, 0x30, // |00600.0000000.00|
490 0x30, 0x30, 0x30, 0x30, 0x30, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x34, // |00000.0000000004|
493 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x00, 0x30, 0x31, 0x31, // |.00000000000.011|
494 - 0x31, 0x37, 0x33, // -|173|
495 + 0x32, 0x31, 0x37, // +|217|
496 0x00, 0x20, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // |. 0.............|
497 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // |................|
498 ... // 326 identical bytes
502 ... // 10 identical fields
504 >>> TestDiff/Reporter/StringHexdump
505 <<< TestDiff/Reporter/BinaryString
506 cmp_test.MyComposite{
510 `{"firstName":"John","lastName":"Smith","isAlive":true,"age":27,"`,
511 `address":{"streetAddress":"`,
514 `","city":"New York","state":"NY","postalCode":"10021-3100"},"pho`,
515 `neNumbers":[{"type":"home","number":"212 555-1234"},{"type":"off`,
516 ... // 101 identical bytes
520 ... // 9 identical fields
522 >>> TestDiff/Reporter/BinaryString
523 <<< TestDiff/Reporter/TripleQuote
524 cmp_test.MyComposite{
533 ... // 10 identical lines
542 ... // 6 identical lines
547 ... // 11 identical fields
549 >>> TestDiff/Reporter/TripleQuote
550 <<< TestDiff/Reporter/TripleQuoteSlice
554 ... // 23 identical lines
560 "aaa\nbbb\nccc\nddd\neee\nfff\nggg\nhhh\niii\njjj\nkkk\nlll\nmmm\nnnn\nooo\nppp\n"...,
562 >>> TestDiff/Reporter/TripleQuoteSlice
563 <<< TestDiff/Reporter/TripleQuoteNamedTypes
564 cmp_test.MyComposite{
574 ... // 10 identical lines
583 ... // 5 identical lines
588 BytesC: cmp_test.MyBytes(
596 ... // 10 identical lines
605 ... // 5 identical lines
610 ... // 7 identical fields
612 >>> TestDiff/Reporter/TripleQuoteNamedTypes
613 <<< TestDiff/Reporter/TripleQuoteSliceNamedTypes
617 ... // 23 identical lines
623 "aaa\nbbb\nccc\nddd\neee\nfff\nggg\nhhh\niii\njjj\nkkk\nlll\nmmm\nnnn\nooo\nppp\n"...,
625 >>> TestDiff/Reporter/TripleQuoteSliceNamedTypes
626 <<< TestDiff/Reporter/TripleQuoteEndlines
635 ... // 10 identical lines
642 ... // 4 identical lines
648 >>> TestDiff/Reporter/TripleQuoteEndlines
649 <<< TestDiff/Reporter/AvoidTripleQuoteAmbiguousQuotes
661 ... // 7 identical lines
668 ... // 7 identical lines
670 >>> TestDiff/Reporter/AvoidTripleQuoteAmbiguousQuotes
671 <<< TestDiff/Reporter/AvoidTripleQuoteAmbiguousEllipsis
681 ... // 9 identical lines
688 ... // 7 identical lines
690 >>> TestDiff/Reporter/AvoidTripleQuoteAmbiguousEllipsis
691 <<< TestDiff/Reporter/AvoidTripleQuoteNonPrintable
699 ... // 7 identical lines
710 ... // 7 identical lines
712 >>> TestDiff/Reporter/AvoidTripleQuoteNonPrintable
713 <<< TestDiff/Reporter/AvoidTripleQuoteIdenticalWhitespace
723 ... // 9 identical lines
730 ... // 7 identical lines
732 >>> TestDiff/Reporter/AvoidTripleQuoteIdenticalWhitespace
733 <<< TestDiff/Reporter/TripleQuoteStringer
735 s"package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tfmt.Println(\"Hel"...,
746 - fmt.Println("My favorite number is", rand.Intn(10))
760 + fmt.Printf("Now you have %g problems.\n", math.Sqrt(7))
765 >>> TestDiff/Reporter/TripleQuoteStringer
766 <<< TestDiff/Reporter/LimitMaximumBytesDiffs
768 - 0xcd, 0x3d, 0x3d, 0x3d, 0x3d, 0x06, 0x1f, 0xc2, 0xcc, 0xc2, 0x2d, 0x53, // -|.====.....-S|
769 + 0x5c, 0x3d, 0x3d, 0x3d, 0x3d, 0x7c, 0x96, 0xe7, 0x53, 0x42, 0xa0, 0xab, // +|\====|..SB..|
770 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, // |=====|
771 - 0x1d, 0xdf, 0x61, 0xae, 0x98, 0x9f, 0x48, // -|..a...H|
772 + 0xf0, 0xbd, 0xa5, 0x71, 0xab, 0x17, 0x3b, // +|...q..;|
773 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, // |======|
774 - 0xc7, 0xb0, 0xb7, // -|...|
775 + 0xab, 0x50, 0x00, // +|.P.|
776 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, // |=======|
777 - 0xef, 0x3d, 0x3d, 0x3d, 0x3d, 0x3a, 0x5c, 0x94, 0xe6, 0x4a, 0xc7, // -|.====:\..J.|
778 + 0xeb, 0x3d, 0x3d, 0x3d, 0x3d, 0xa5, 0x14, 0xe6, 0x4f, 0x28, 0xe4, // +|.====...O(.|
779 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, // |=====|
782 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, // |======|
783 - 0x0a, 0x0a, 0xf7, 0x94, // -|....|
784 + 0x2f, 0x63, 0x40, 0x3f, // +|/c@?|
785 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, // |===========|
786 - 0xf2, 0x9c, 0xc0, 0x66, // -|...f|
787 + 0xd9, 0x78, 0xed, 0x13, // +|.x..|
788 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, // |=====|
789 - 0x34, 0xf6, 0xf1, 0xc3, 0x17, 0x82, // -|4.....|
790 + 0x4a, 0xfc, 0x91, 0x38, 0x42, 0x8d, // +|J..8B.|
791 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, // |======|
792 - 0x6e, 0x16, 0x60, 0x91, 0x44, 0xc6, 0x06, // -|n.`.D..|
793 + 0x61, 0x38, 0x41, 0xeb, 0x73, 0x04, 0xae, // +|a8A.s..|
794 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, // |=======|
795 - 0x1c, 0x45, 0x3d, 0x3d, 0x3d, 0x3d, 0x2e, // -|.E====.|
796 + 0x07, 0x43, 0x3d, 0x3d, 0x3d, 0x3d, 0x1c, // +|.C====.|
797 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, // |===========|
798 - 0xc4, 0x18, // -|..|
799 + 0x91, 0x22, // +|."|
800 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, // |=======|
801 - 0x8a, 0x8d, 0x0e, 0x3d, 0x3d, 0x3d, 0x3d, 0x87, 0xb1, 0xa5, 0x8e, 0xc3, 0x3d, 0x3d, 0x3d, 0x3d, // -|...====.....====|
802 - 0x3d, 0x7a, 0x0f, 0x31, 0xae, 0x55, 0x3d, // -|=z.1.U=|
803 + 0x75, 0xd8, 0xbe, 0x3d, 0x3d, 0x3d, 0x3d, 0x73, 0xec, 0x84, 0x35, 0x07, 0x3d, 0x3d, 0x3d, 0x3d, // +|u..====s..5.====|
804 + 0x3d, 0x3b, 0xab, 0x53, 0x39, 0x74, // +|=;.S9t|
805 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, // |=====|
806 - 0x47, 0x2c, 0x3d, // -|G,=|
807 + 0x3d, 0x1f, 0x1b, // +|=..|
808 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, // |======|
809 - 0x35, 0xe7, 0x35, 0xee, 0x82, 0xf4, 0xce, 0x3d, 0x3d, 0x3d, 0x3d, 0x11, 0x72, 0x3d, // -|5.5....====.r=|
810 + 0x3d, 0x80, 0xab, 0x2f, 0xed, 0x2b, 0x3a, 0x3b, 0x3d, 0x3d, 0x3d, 0x3d, 0xea, 0x49, // +|=../.+:;====.I|
811 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, // |==========|
812 - 0xaf, 0x5d, 0x3d, // -|.]=|
813 + 0x3d, 0xab, 0x6c, // +|=.l|
814 ... // 51 identical, 34 removed, and 35 inserted bytes
816 >>> TestDiff/Reporter/LimitMaximumBytesDiffs
817 <<< TestDiff/Reporter/LimitMaximumStringDiffs
867 ... // 12 identical, 10 removed, and 10 inserted lines
870 >>> TestDiff/Reporter/LimitMaximumStringDiffs
871 <<< TestDiff/Reporter/LimitMaximumSliceDiffs
872 []struct{ S string }{
920 ... // 12 identical and 10 modified elements
922 >>> TestDiff/Reporter/LimitMaximumSliceDiffs
923 <<< TestDiff/Reporter/MultilineString
924 cmp_test.MyComposite{
927 - Package cmp determines equality of values.
928 + Package cmp determines equality of value.
930 This package is intended to be a more powerful and safer alternative to
931 ... // 6 identical lines
932 For example, an equality function may report floats as equal so long as they
933 are within some tolerance of each other.
935 - • Types that have an Equal method may use that method to determine equality.
936 - This allows package authors to determine the equality operation for the types
939 • If no custom equality functions are used and no Equal method is defined,
940 ... // 3 identical lines
941 by using an Ignore option (see cmpopts.IgnoreUnexported) or explicitly compared
942 using the AllowUnexported option.
948 ... // 11 identical fields
950 >>> TestDiff/Reporter/MultilineString
951 <<< TestDiff/Reporter/Slices
952 cmp_test.MyComposite{
955 - BytesA: []uint8{0x01, 0x02, 0x03},
957 - BytesB: []cmp_test.MyByte{0x04, 0x05, 0x06},
959 - BytesC: cmp_test.MyBytes{0x07, 0x08, 0x09},
961 - IntsA: []int8{-1, -2, -3},
963 - IntsB: []cmp_test.MyInt{-4, -5, -6},
965 - IntsC: cmp_test.MyInts{-7, -8, -9},
967 - UintsA: []uint16{1000, 2000, 3000},
969 - UintsB: []cmp_test.MyUint{4000, 5000, 6000},
971 - UintsC: cmp_test.MyUints{7000, 8000, 9000},
973 - FloatsA: []float32{1.5, 2.5, 3.5},
975 - FloatsB: []cmp_test.MyFloat{4.5, 5.5, 6.5},
977 - FloatsC: cmp_test.MyFloats{7.5, 8.5, 9.5},
980 >>> TestDiff/Reporter/Slices
981 <<< TestDiff/Reporter/EmptySlices
982 cmp_test.MyComposite{
987 - BytesB: []cmp_test.MyByte{},
989 - BytesC: cmp_test.MyBytes{},
993 - IntsB: []cmp_test.MyInt{},
995 - IntsC: cmp_test.MyInts{},
997 - UintsA: []uint16{},
999 - UintsB: []cmp_test.MyUint{},
1001 - UintsC: cmp_test.MyUints{},
1003 - FloatsA: []float32{},
1005 - FloatsB: []cmp_test.MyFloat{},
1007 - FloatsC: cmp_test.MyFloats{},
1010 >>> TestDiff/Reporter/EmptySlices
1011 <<< TestDiff/EmbeddedStruct/ParentStructA/Inequal
1012 teststructs.ParentStructA{
1013 privateStruct: teststructs.privateStruct{
1020 >>> TestDiff/EmbeddedStruct/ParentStructA/Inequal
1021 <<< TestDiff/EmbeddedStruct/ParentStructB/Inequal
1022 teststructs.ParentStructB{
1023 PublicStruct: teststructs.PublicStruct{
1030 >>> TestDiff/EmbeddedStruct/ParentStructB/Inequal
1031 <<< TestDiff/EmbeddedStruct/ParentStructC/Inequal
1032 teststructs.ParentStructC{
1033 privateStruct: teststructs.privateStruct{
1044 >>> TestDiff/EmbeddedStruct/ParentStructC/Inequal
1045 <<< TestDiff/EmbeddedStruct/ParentStructD/Inequal
1046 teststructs.ParentStructD{
1047 PublicStruct: teststructs.PublicStruct{
1058 >>> TestDiff/EmbeddedStruct/ParentStructD/Inequal
1059 <<< TestDiff/EmbeddedStruct/ParentStructE/Inequal
1060 teststructs.ParentStructE{
1061 privateStruct: teststructs.privateStruct{
1067 PublicStruct: teststructs.PublicStruct{
1074 >>> TestDiff/EmbeddedStruct/ParentStructE/Inequal
1075 <<< TestDiff/EmbeddedStruct/ParentStructF/Inequal
1076 teststructs.ParentStructF{
1077 privateStruct: teststructs.privateStruct{
1083 PublicStruct: teststructs.PublicStruct{
1094 >>> TestDiff/EmbeddedStruct/ParentStructF/Inequal
1095 <<< TestDiff/EmbeddedStruct/ParentStructG/Inequal
1096 &teststructs.ParentStructG{
1097 privateStruct: &teststructs.privateStruct{
1104 >>> TestDiff/EmbeddedStruct/ParentStructG/Inequal
1105 <<< TestDiff/EmbeddedStruct/ParentStructH/Inequal
1106 &teststructs.ParentStructH{
1107 PublicStruct: &teststructs.PublicStruct{
1114 >>> TestDiff/EmbeddedStruct/ParentStructH/Inequal
1115 <<< TestDiff/EmbeddedStruct/ParentStructI/Inequal
1116 &teststructs.ParentStructI{
1117 privateStruct: &teststructs.privateStruct{
1123 PublicStruct: &teststructs.PublicStruct{
1130 >>> TestDiff/EmbeddedStruct/ParentStructI/Inequal
1131 <<< TestDiff/EmbeddedStruct/ParentStructJ/Inequal
1132 &teststructs.ParentStructJ{
1133 privateStruct: &teststructs.privateStruct{
1139 PublicStruct: &teststructs.PublicStruct{
1145 Public: teststructs.PublicStruct{
1151 private: teststructs.privateStruct{
1158 >>> TestDiff/EmbeddedStruct/ParentStructJ/Inequal
1159 <<< TestDiff/EqualMethod/StructB/ValueInequal
1160 teststructs.StructB{
1164 >>> TestDiff/EqualMethod/StructB/ValueInequal
1165 <<< TestDiff/EqualMethod/StructD/ValueInequal
1166 teststructs.StructD{
1170 >>> TestDiff/EqualMethod/StructD/ValueInequal
1171 <<< TestDiff/EqualMethod/StructE/ValueInequal
1172 teststructs.StructE{
1176 >>> TestDiff/EqualMethod/StructE/ValueInequal
1177 <<< TestDiff/EqualMethod/StructF/ValueInequal
1178 teststructs.StructF{
1182 >>> TestDiff/EqualMethod/StructF/ValueInequal
1183 <<< TestDiff/EqualMethod/StructA1/ValueInequal
1184 teststructs.StructA1{
1185 StructA: {X: "NotEqual"},
1189 >>> TestDiff/EqualMethod/StructA1/ValueInequal
1190 <<< TestDiff/EqualMethod/StructA1/PointerInequal
1191 &teststructs.StructA1{
1192 StructA: {X: "NotEqual"},
1196 >>> TestDiff/EqualMethod/StructA1/PointerInequal
1197 <<< TestDiff/EqualMethod/StructB1/ValueInequal
1198 teststructs.StructB1{
1199 StructB: Inverse(Addr, &teststructs.StructB{X: "NotEqual"}),
1203 >>> TestDiff/EqualMethod/StructB1/ValueInequal
1204 <<< TestDiff/EqualMethod/StructB1/PointerInequal
1205 &teststructs.StructB1{
1206 StructB: Inverse(Addr, &teststructs.StructB{X: "NotEqual"}),
1210 >>> TestDiff/EqualMethod/StructB1/PointerInequal
1211 <<< TestDiff/EqualMethod/StructD1/ValueInequal
1212 teststructs.StructD1{
1213 - StructD: teststructs.StructD{X: "NotEqual"},
1214 + StructD: teststructs.StructD{X: "not_equal"},
1218 >>> TestDiff/EqualMethod/StructD1/ValueInequal
1219 <<< TestDiff/EqualMethod/StructE1/ValueInequal
1220 teststructs.StructE1{
1221 - StructE: teststructs.StructE{X: "NotEqual"},
1222 + StructE: teststructs.StructE{X: "not_equal"},
1226 >>> TestDiff/EqualMethod/StructE1/ValueInequal
1227 <<< TestDiff/EqualMethod/StructF1/ValueInequal
1228 teststructs.StructF1{
1229 - StructF: teststructs.StructF{X: "NotEqual"},
1230 + StructF: teststructs.StructF{X: "not_equal"},
1234 >>> TestDiff/EqualMethod/StructF1/ValueInequal
1235 <<< TestDiff/EqualMethod/StructA2/ValueInequal
1236 teststructs.StructA2{
1237 StructA: &{X: "NotEqual"},
1241 >>> TestDiff/EqualMethod/StructA2/ValueInequal
1242 <<< TestDiff/EqualMethod/StructA2/PointerInequal
1243 &teststructs.StructA2{
1244 StructA: &{X: "NotEqual"},
1248 >>> TestDiff/EqualMethod/StructA2/PointerInequal
1249 <<< TestDiff/EqualMethod/StructB2/ValueInequal
1250 teststructs.StructB2{
1251 StructB: &{X: "NotEqual"},
1255 >>> TestDiff/EqualMethod/StructB2/ValueInequal
1256 <<< TestDiff/EqualMethod/StructB2/PointerInequal
1257 &teststructs.StructB2{
1258 StructB: &{X: "NotEqual"},
1262 >>> TestDiff/EqualMethod/StructB2/PointerInequal
1263 <<< TestDiff/EqualMethod/StructNo/Inequal
1264 teststructs.StructNo{
1268 >>> TestDiff/EqualMethod/StructNo/Inequal
1269 <<< TestDiff/Cycle/PointersInequal
1270 &&⟪ref#0⟫cmp_test.P(
1274 >>> TestDiff/Cycle/PointersInequal
1275 <<< TestDiff/Cycle/SlicesInequal
1277 - ⟪ref#0⟫{⟪ref#0⟫(...)},
1278 + ⟪ref#1⟫{{⟪ref#1⟫(...)}},
1280 >>> TestDiff/Cycle/SlicesInequal
1281 <<< TestDiff/Cycle/MapsInequal
1284 + 0: {0: ⟪ref#0⟫(...)},
1286 >>> TestDiff/Cycle/MapsInequal
1287 <<< TestDiff/Cycle/GraphInequalZeroed
1288 map[string]*cmp_test.CycleAlpha{
1291 Bravos: map[string]*cmp_test.CycleBravo{
1292 "BarBuzzBravo": &⟪ref#1⟫{
1295 Name: "BarBuzzBravo",
1297 Alphas: map[string]*cmp_test.CycleAlpha{
1298 "Bar": &⟪ref#0⟫(...),
1301 Bravos: map[string]*cmp_test.CycleBravo{
1302 "BarBuzzBravo": &⟪ref#1⟫(...),
1303 "BuzzBarBravo": &⟪ref#3⟫{
1306 Name: "BuzzBarBravo",
1308 Alphas: {"Bar": &⟪ref#0⟫(...), "Buzz": &⟪ref#2⟫(...)},
1314 "BuzzBarBravo": &⟪ref#3⟫{
1317 Name: "BuzzBarBravo",
1319 Alphas: map[string]*cmp_test.CycleAlpha{
1320 "Bar": &⟪ref#0⟫(...),
1323 Bravos: map[string]*cmp_test.CycleBravo{
1324 "BarBuzzBravo": &⟪ref#1⟫{
1327 Name: "BarBuzzBravo",
1329 Alphas: {"Bar": &⟪ref#0⟫(...), "Buzz": &⟪ref#2⟫(...)},
1331 "BuzzBarBravo": &⟪ref#3⟫(...),
1340 Bravos: map[string]*cmp_test.CycleBravo{
1341 "BarBuzzBravo": &⟪ref#1⟫{
1344 Name: "BarBuzzBravo",
1346 Alphas: map[string]*cmp_test.CycleAlpha{
1349 Bravos: map[string]*cmp_test.CycleBravo{
1350 "BarBuzzBravo": &⟪ref#1⟫(...),
1351 "BuzzBarBravo": &⟪ref#3⟫{
1354 Name: "BuzzBarBravo",
1356 Alphas: {"Bar": &⟪ref#0⟫(...), "Buzz": &⟪ref#2⟫(...)},
1360 "Buzz": &⟪ref#2⟫(...),
1363 "BuzzBarBravo": &⟪ref#3⟫{
1366 Name: "BuzzBarBravo",
1368 Alphas: map[string]*cmp_test.CycleAlpha{
1371 Bravos: map[string]*cmp_test.CycleBravo{
1372 "BarBuzzBravo": &⟪ref#1⟫{
1375 Name: "BarBuzzBravo",
1377 Alphas: {"Bar": &⟪ref#0⟫(...), "Buzz": &⟪ref#2⟫(...)},
1379 "BuzzBarBravo": &⟪ref#3⟫(...),
1382 "Buzz": &⟪ref#2⟫(...),
1389 Bravos: map[string]*cmp_test.CycleBravo{
1395 Alphas: {"Foo": &⟪ref#4⟫(...)},
1400 >>> TestDiff/Cycle/GraphInequalZeroed
1401 <<< TestDiff/Cycle/GraphInequalStruct
1402 map[string]*cmp_test.CycleAlpha{
1405 Bravos: map[string]*cmp_test.CycleBravo{
1406 "BarBuzzBravo": &⟪ref#1⟫{
1408 Name: "BarBuzzBravo",
1410 Alphas: map[string]*cmp_test.CycleAlpha{
1411 "Bar": &⟪ref#0⟫(...),
1414 Bravos: map[string]*cmp_test.CycleBravo{
1415 "BarBuzzBravo": &⟪ref#1⟫(...),
1416 "BuzzBarBravo": &⟪ref#3⟫{
1418 Name: "BuzzBarBravo",
1421 + Alphas: map[string]*cmp_test.CycleAlpha{"Bar": &⟪ref#0⟫(...), "Buzz": &⟪ref#2⟫(...)},
1427 "BuzzBarBravo": &⟪ref#3⟫{
1429 Name: "BuzzBarBravo",
1431 Alphas: map[string]*cmp_test.CycleAlpha{
1432 "Bar": &⟪ref#0⟫(...),
1435 Bravos: map[string]*cmp_test.CycleBravo{
1436 "BarBuzzBravo": &⟪ref#1⟫{ID: 102, Name: "BarBuzzBravo", Mods: 2, Alphas: {"Bar": &⟪ref#0⟫(...), "Buzz": &⟪ref#2⟫(...)}},
1437 - "BuzzBarBravo": &{ID: 103, Name: "BuzzBarBravo"},
1438 + "BuzzBarBravo": &⟪ref#3⟫(...),
1447 Bravos: map[string]*cmp_test.CycleBravo{
1448 "BarBuzzBravo": &⟪ref#1⟫{ID: 102, Name: "BarBuzzBravo", Mods: 2, Alphas: {"Bar": &⟪ref#0⟫{Name: "Bar", Bravos: {"BarBuzzBravo": &⟪ref#1⟫(...), "BuzzBarBravo": &⟪ref#3⟫{ID: 103, Name: "BuzzBarBravo", Alphas: {"Bar": &⟪ref#0⟫(...), "Buzz": &⟪ref#2⟫(...)}}}}, "Buzz": &⟪ref#2⟫(...)}},
1449 "BuzzBarBravo": &⟪ref#3⟫{
1451 Name: "BuzzBarBravo",
1454 + Alphas: map[string]*cmp_test.CycleAlpha{
1457 + Bravos: map[string]*cmp_test.CycleBravo{"BarBuzzBravo": &⟪ref#1⟫{...}, "BuzzBarBravo": &⟪ref#3⟫(...)},
1459 + "Buzz": &⟪ref#2⟫(...),
1464 "Foo": &⟪ref#4⟫{Name: "Foo", Bravos: {"FooBravo": &{ID: 101, Name: "FooBravo", Mods: 100, Alphas: {"Foo": &⟪ref#4⟫(...)}}}},
1466 >>> TestDiff/Cycle/GraphInequalStruct
1467 <<< TestDiff/Project1/ProtoInequal
1469 ... // 4 identical fields
1472 Slaps: []teststructs.Slap{
1473 ... // 2 identical elements
1480 - Args: s"metadata",
1481 + Args: s"metadata2",
1484 ... // 3 identical fields
1489 ... // 2 identical fields
1491 >>> TestDiff/Project1/ProtoInequal
1492 <<< TestDiff/Project1/Inequal
1494 ... // 2 identical fields
1495 Desc: "some description",
1497 Dreamers: []teststructs.Dreamer{
1500 ... // 4 identical fields
1502 ContSlapsInterval: 0,
1503 Animal: []interface{}{
1505 Target: "corporation",
1508 Immutable: &teststructs.GoatImmutable{
1513 Started: s"2009-11-10 23:00:00 +0000 UTC",
1514 Stopped: s"0001-01-01 00:00:00 +0000 UTC",
1515 ... // 1 ignored and 1 identical fields
1518 teststructs.Donkey{},
1522 ... // 5 identical fields
1526 Slaps: []teststructs.Slap{
1528 ... // 6 identical fields
1531 Immutable: &teststructs.SlapImmutable{
1532 ID: "immutableSlap",
1538 Started: s"2009-11-10 23:00:00 +0000 UTC",
1539 Stopped: s"0001-01-01 00:00:00 +0000 UTC",
1540 LastUpdate: s"0001-01-01 00:00:00 +0000 UTC",
1541 LoveRadius: &teststructs.LoveRadius{
1542 Summer: &teststructs.SummerLove{
1543 Summary: &teststructs.SummerLoveSummary{
1549 ChangeType: {1, 2, 3},
1550 ... // 1 ignored field
1552 ... // 1 ignored field
1554 ... // 1 ignored field
1556 ... // 1 ignored field
1562 ... // 2 identical fields
1564 >>> TestDiff/Project1/Inequal
1565 <<< TestDiff/Project2/InequalOrder
1566 teststructs.GermBatch{
1567 DirtyGerms: map[int32][]*testprotos.Germ{
1577 GermMap: {13: s"germ13", 21: s"germ21"},
1578 ... // 7 identical fields
1580 >>> TestDiff/Project2/InequalOrder
1581 <<< TestDiff/Project2/Inequal
1582 teststructs.GermBatch{
1583 DirtyGerms: map[int32][]*testprotos.Germ{
1585 18: Inverse(Sort, []*testprotos.Germ{
1592 GermMap: {13: s"germ13", 21: s"germ21"},
1593 DishMap: map[int32]*teststructs.Dish{
1596 + 1: &{err: e"unexpected EOF"},
1599 HasPreviousResult: true,
1605 InfectedAt: s"2009-11-10 23:00:00 +0000 UTC",
1607 >>> TestDiff/Project2/Inequal
1608 <<< TestDiff/Project3/Inequal
1610 - table: &teststructs.MockTable{state: []string{"a", "c"}},
1611 + table: &teststructs.MockTable{state: []string{"a", "b", "c"}},
1615 - Proto: testprotos.Dirt(Inverse(λ, s"blah")),
1616 + Proto: testprotos.Dirt(Inverse(λ, s"proto")),
1617 wizard: map[string]*testprotos.Wizard{
1618 - "albus": s"dumbledore",
1619 - "harry": s"potter",
1620 + "harry": s"otter",
1624 ... // 1 ignored field
1626 >>> TestDiff/Project3/Inequal
1627 <<< TestDiff/Project4/Inequal
1629 Headquarter: teststructs.Headquarter{
1632 subDivisions: []string{
1637 incorporatedDate: s"0001-01-01 00:00:00 +0000 UTC",
1638 metaData: s"metadata",
1639 privateMessage: nil,
1640 publicMessage: []uint8{
1649 horseBack: "abcdef",
1651 ... // 5 identical fields
1654 creationDate: s"0001-01-01 00:00:00 +0000 UTC",
1656 lastCrimeDate: s"0001-01-01 00:00:00 +0000 UTC",
1657 poisons: []*teststructs.Poison{
1661 expiration: s"2009-11-10 23:00:00 +0000 UTC",
1662 manufacturer: "acme",
1665 - &{poisonType: 2, manufacturer: "acme2"},
1668 >>> TestDiff/Project4/Inequal