This commit is contained in:
Kovid Goyal
2025-01-16 13:21:31 +05:30
parent 081c061538
commit 0ffaaff8a7
2 changed files with 4 additions and 4 deletions

View File

@@ -183,14 +183,14 @@ func TestRsyncHashers(t *testing.T) {
h := new_xxh3_64() h := new_xxh3_64()
h.Write([]byte("abcd")) h.Write([]byte("abcd"))
if diff := cmp.Diff(hex.EncodeToString(h.Sum(nil)), `6497a96f53a89890`); diff != "" { if diff := cmp.Diff(hex.EncodeToString(h.Sum(nil)), `6497a96f53a89890`); diff != "" {
t.Fatalf(diff) t.Fatalf("%s", diff)
} }
if diff := cmp.Diff(h.Sum64(), uint64(7248448420886124688)); diff != "" { if diff := cmp.Diff(h.Sum64(), uint64(7248448420886124688)); diff != "" {
t.Fatalf(diff) t.Fatalf("%s", diff)
} }
h2 := new_xxh3_128() h2 := new_xxh3_128()
h2.Write([]byte("abcd")) h2.Write([]byte("abcd"))
if diff := cmp.Diff(hex.EncodeToString(h2.Sum(nil)), `8d6b60383dfa90c21be79eecd1b1353d`); diff != "" { if diff := cmp.Diff(hex.EncodeToString(h2.Sum(nil)), `8d6b60383dfa90c21be79eecd1b1353d`); diff != "" {
t.Fatalf(diff) t.Fatalf("%s", diff)
} }
} }

View File

@@ -39,7 +39,7 @@ func TestParseSocketAddress(t *testing.T) {
test(spec) test(spec)
} }
teste := func(spec string, e string) { teste := func(spec string, e string) {
eerr = fmt.Errorf(e) eerr = fmt.Errorf("%s", e)
test(spec) test(spec)
} }