MCPcopy
hub / github.com/go-git/go-git / TestNewHasher

Method TestNewHasher

plumbing/hash_test.go:37–42  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

35}
36
37func (s *HashSuite) TestNewHasher(c *C) {
38 content := "hasher test sample"
39 hasher := NewHasher(BlobObject, int64(len(content)))
40 hasher.Write([]byte(content))
41 c.Assert(hasher.Sum().String(), Equals, "dc42c3cc80028d0ec61f0a6b24cadd1c195c4dfc")
42}
43
44func (s *HashSuite) TestHashesSort(c *C) {
45 i := []Hash{

Callers

nothing calls this directly

Calls 4

SumMethod · 0.95
NewHasherFunction · 0.85
StringMethod · 0.65
WriteMethod · 0.45

Tested by

no test coverage detected