MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / TestFNVHash32uint

Function TestFNVHash32uint

crypto/hash/hashfuncs_test.go:174–192  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

172}
173
174func TestFNVHash32uint(t *testing.T) {
175 tests := []struct {
176 out uint32
177 in string
178 }{
179 {2166136261, ""},
180 {84696446, "a"},
181 {1886858552, "ab"},
182 {1134309195, "abc"},
183 }
184 for _, test := range tests {
185 i := FNVHash32uint([]byte(test.in))
186 if i != test.out {
187 t.Errorf("FNVHash32uint(%q) = %d, want %d", test.in, i,
188 test.out)
189 continue
190 }
191 }
192}
193
194func TestTHashB(t *testing.T) {
195 tests := []struct {

Callers

nothing calls this directly

Calls 2

FNVHash32uintFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected