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

Function TestTHashB

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

Source from the content-addressed store, hash-verified

192}
193
194func TestTHashB(t *testing.T) {
195 tests := []struct {
196 out string
197 in string
198 }{
199 {"0de4562d6cdc540f430d6810375c278c545865bc4f1496571e9166ec97da283a", ""},
200 {"e44e59f7f22470ae9c67e5f00ca0dc953d87a040a6a0782ea1ebd4e46113ce57", "a"},
201 {"7bf8d035589f6a3320b443e20f5f834466a8b0e64306d63c066ddb1591330e52", "ab"},
202 {"41edb331faeae63be46881b4087336c9fa4c17ad62f158ad67d6e5aa1404bc17", "abc"},
203 }
204
205 for _, test := range tests {
206 hash := THashH([]byte(test.in))
207 if hash.String() != test.out {
208 t.Errorf("THashB(%q) = %s, want %s", test.in, hash,
209 test.out)
210 continue
211 }
212 }
213}
214
215func TestTHashH(t *testing.T) {
216 Convey("HashH HashB", t, func() {

Callers

nothing calls this directly

Calls 3

THashHFunction · 0.85
ErrorfMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected