MCPcopy Create free account
hub / github.com/boyter/hashit / TestProcessReadFile

Function TestProcessReadFile

processor/workers_test.go:7–22  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

5)
6
7func TestProcessReadFile(t *testing.T) {
8 Hash = append(Hash, "all")
9 res, _ := processReadFileParallel("filename", &[]byte{})
10
11 if res.MD5 != "d41d8cd98f00b204e9800998ecf8427e" {
12 t.Errorf("Expected d41d8cd98f00b204e9800998ecf8427e got %s", res.MD5)
13 }
14
15 if res.SHA1 != "da39a3ee5e6b4b0d3255bfef95601890afd80709" {
16 t.Errorf("Expected da39a3ee5e6b4b0d3255bfef95601890afd80709 got %s", res.SHA1)
17 }
18
19 if res.SHA256 != "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" {
20 t.Errorf("Expected e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 got %s", res.SHA256)
21 }
22}
23
24//////////////////////////////////////////////////
25// Benchmarks Below

Callers

nothing calls this directly

Calls 1

processReadFileParallelFunction · 0.85

Tested by

no test coverage detected