Skip to content

Commit

Permalink
fix test data
Browse files Browse the repository at this point in the history
  • Loading branch information
kmulvey committed Feb 22, 2024
1 parent 0ad1db0 commit 5c8f5ba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion concurrenthash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestEverything(t *testing.T) {
var cs = NewConcurrentHash(2, 10, sha256.New)
var sum, err = cs.HashFile(ctx, "./rand-file.txt")
assert.NoError(t, err)
assert.Equal(t, "bf842e96b246556052bc7e518de1fdf7c4a5a859ad104a201880074bece30b82", sum)
assert.Equal(t, "4870bc3d9a751543ee66685fde1a81a78265bed8e532878fb45da0cb08aa5f3c", sum)

sum, err = cs.HashFile(ctx, "./sdfsdfsf.txt")
assert.Contains(t, err.Error(), "./sdfsdfsf.txt:") // this is quite loose because windows
Expand Down
36 changes: 18 additions & 18 deletions wrappers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ type testPair struct {
}

var testMatrix = []testPair{
{HashFunc: WrapAdler32, Expected: "6815116b"},
{HashFunc: WrapCrc32IEEE, Expected: "6f81847d"},
{HashFunc: WrapCrc32Castagnoli, Expected: "1e094105"},
{HashFunc: WrapCrc32Koopman, Expected: "028f318a"},
{HashFunc: WrapCrc64ISO, Expected: "e7d62d1e76bd73da"},
{HashFunc: WrapCrc64ECMA, Expected: "621d482973c9cc9c"},
{HashFunc: WrapFnv32, Expected: "8229dab3"},
{HashFunc: WrapFnv32a, Expected: "6bfaa839"},
{HashFunc: WrapFnv64, Expected: "faf332cf3012c68c"},
{HashFunc: WrapFnv64a, Expected: "3bdd3a9af0591c54"},
{HashFunc: WrapMurmur32, Expected: "46846d69"},
{HashFunc: WrapMurmur64, Expected: "3cdc2235f66f74bf"},
{HashFunc: WrapSha512, Expected: "570679214223a4a0f7cd82cdf6f433fd897b7e8e1776a9c3e6842f8d2f8f7211b1aaabf06703e78d95e44d1068b88a15fb6bffc70e870580b070548dd63e9d64"},
{HashFunc: WrapSha384, Expected: "fe7ce20c68d58076774402eb2bb27c57978a69f3ae7778387ddd52bc9e4d48f7a42496a97dd97bb560be23ecccecabd5"},
{HashFunc: WrapSha512224, Expected: "8fa68c2902b434728a005ffdc77338b84b7784f58e7f6832b09d1d2b"},
{HashFunc: WrapSha512256, Expected: "800b50f0c527cd902b7d5478ea9bbc277b2aaa6e15d5e9ff024cbf31ed582661"},
{HashFunc: WrapSha256, Expected: "bf842e96b246556052bc7e518de1fdf7c4a5a859ad104a201880074bece30b82"},
{HashFunc: WrapSha224, Expected: "c50e3b0a3f05746297ce9409495e77e91f4b305953ad352a7a264f39"},
{HashFunc: WrapAdler32, Expected: "23a01065"},
{HashFunc: WrapCrc32IEEE, Expected: "adb01c6e"},
{HashFunc: WrapCrc32Castagnoli, Expected: "99b59cc7"},
{HashFunc: WrapCrc32Koopman, Expected: "e9babd88"},
{HashFunc: WrapCrc64ISO, Expected: "a9d108f9820cbe08"},
{HashFunc: WrapCrc64ECMA, Expected: "7b0ffccb93d003c8"},
{HashFunc: WrapFnv32, Expected: "fc61f007"},
{HashFunc: WrapFnv32a, Expected: "84eaae15"},
{HashFunc: WrapFnv64, Expected: "17c6956e1d89b318"},
{HashFunc: WrapFnv64a, Expected: "0d2bc6f6ebf6d810"},
{HashFunc: WrapMurmur32, Expected: "824cebde"},
{HashFunc: WrapMurmur64, Expected: "b75d2949c06573bd"},
{HashFunc: WrapSha512, Expected: "abb5de305b09ed982ead4fd13855ea1b6e50f462e01002e9d174309e82ead36c159f743b8e7208c10aca8c3ac116b2398afab4611b2f9efc0652a84e126d515a"},
{HashFunc: WrapSha384, Expected: "f38e9bc1b649513b3c4eb6bb4b11c86cd23a55b42d78087eddc0f649c810c542c16beb1c35de339d001884cb79b8c4c4"},
{HashFunc: WrapSha512224, Expected: "1b851853155f85ea87e0b96c2ba2e6f47f166acbd764641a790f6bac"},
{HashFunc: WrapSha512256, Expected: "c7e8e3d5eec72a5375ba6a51f03ee6027237cc6edbb9213957c6bd5fc72f62f5"},
{HashFunc: WrapSha256, Expected: "4870bc3d9a751543ee66685fde1a81a78265bed8e532878fb45da0cb08aa5f3c"},
{HashFunc: WrapSha224, Expected: "68808b99d5d240e3dc11db9904cd1891a204b7795639cb2e15eea029"},
}

func TestWrappers(t *testing.T) {
Expand Down

0 comments on commit 5c8f5ba

Please sign in to comment.