MCPcopy Create free account
hub / github.com/benbjohnson/immutable / testNewHasher

Function testNewHasher

immutable_test.go:2134–2141  ·  view source on GitHub ↗
(t *testing.T, v V)

Source from the content-addressed store, hash-verified

2132}
2133
2134func testNewHasher[V constraints.Ordered](t *testing.T, v V) {
2135 t.Helper()
2136 h := NewHasher(v)
2137 h.Hash(v)
2138 if !h.Equal(v, v) {
2139 t.Fatal("expected hash equality")
2140 }
2141}
2142
2143func TestNewComparer(t *testing.T) {
2144 t.Run("builtin", func(t *testing.T) {

Callers 1

TestNewHasherFunction · 0.85

Calls 3

HashMethod · 0.95
EqualMethod · 0.95
NewHasherFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…