Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmp/compare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package cmp_test

import (
"bytes"
"crypto/md5"
"crypto/sha256"
"encoding/json"
"errors"
"flag"
Expand Down Expand Up @@ -476,8 +476,8 @@ func comparerTests() []test {
reason: "comparer for fmt.Stringer used to compare differing types with different strings",
}, {
label: label + "/DifferingHash",
x: md5.Sum([]byte{'a'}),
y: md5.Sum([]byte{'b'}),
x: sha256.Sum256([]byte{'a'}),
y: sha256.Sum256([]byte{'b'}),
wantEqual: false,
reason: "hash differs",
}, {
Expand Down
8 changes: 5 additions & 3 deletions cmp/testdata/diffs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@
)
>>> TestDiff/Comparer/StringerInequal
<<< TestDiff/Comparer/DifferingHash
[16]uint8{
- 0x0c, 0xc1, 0x75, 0xb9, 0xc0, 0xf1, 0xb6, 0xa8, 0x31, 0xc3, 0x99, 0xe2, 0x69, 0x77, 0x26, 0x61,
+ 0x92, 0xeb, 0x5f, 0xfe, 0xe6, 0xae, 0x2f, 0xec, 0x3a, 0xd7, 0x1c, 0x77, 0x75, 0x31, 0x57, 0x8f,
[32]uint8{
- 0xca, 0x97, 0x81, 0x12, 0xca, 0x1b, 0xbd, 0xca, 0xfa, 0xc2, 0x31, 0xb3, 0x9a, 0x23, 0xdc, 0x4d,
- 0xa7, 0x86, 0xef, 0xf8, 0x14, 0x7c, 0x4e, 0x72, 0xb9, 0x80, 0x77, 0x85, 0xaf, 0xee, 0x48, 0xbb,
+ 0x3e, 0x23, 0xe8, 0x16, 0x00, 0x39, 0x59, 0x4a, 0x33, 0x89, 0x4f, 0x65, 0x64, 0xe1, 0xb1, 0x34,
+ 0x8b, 0xbd, 0x7a, 0x00, 0x88, 0xd4, 0x2c, 0x4a, 0xcb, 0x73, 0xee, 0xae, 0xd5, 0x9c, 0x00, 0x9d,
}
>>> TestDiff/Comparer/DifferingHash
<<< TestDiff/Comparer/NilStringer
Expand Down