MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestCheckHash

Function TestCheckHash

internal/utils/bfs/hash_test.go:14–21  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestCheckHash(t *testing.T) {
15 var a = assert.NewAssertion(t)
16
17 a.IsFalse(bfs.CheckHash("123456"))
18 a.IsFalse(bfs.CheckHash(strings.Repeat("A", 32)))
19 a.IsTrue(bfs.CheckHash(strings.Repeat("a", 32)))
20 a.IsTrue(bfs.CheckHash(bfs.Hash("123456")))
21}
22
23func BenchmarkCheckHashErr(b *testing.B) {
24 for i := 0; i < b.N; i++ {

Callers

nothing calls this directly

Calls 2

CheckHashFunction · 0.92
HashFunction · 0.92

Tested by

no test coverage detected