MCPcopy Create free account
hub / github.com/devlongs/gean / TestHashTreeRootBitlist

Function TestHashTreeRootBitlist

common/ssz/ssz_test.go:70–76  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

68}
69
70func TestHashTreeRootBitlist(t *testing.T) {
71 bl, _ := types.BitlistFromBits([]bool{true, false, true}, 100)
72 r := HashTreeRootBitlist(bl)
73 if r.IsZero() {
74 t.Error("should not be zero")
75 }
76}
77
78func TestNextPowerOfTwo(t *testing.T) {
79 tests := [][2]int{{0, 1}, {1, 1}, {2, 2}, {3, 4}, {5, 8}, {8, 8}, {9, 16}}

Callers

nothing calls this directly

Calls 3

BitlistFromBitsFunction · 0.92
HashTreeRootBitlistFunction · 0.85
IsZeroMethod · 0.80

Tested by

no test coverage detected