MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / TestRandomLevel

Function TestRandomLevel

structure/zset_test.go:741–748  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

739 }
740}
741func TestRandomLevel(t *testing.T) {
742 for i := 0; i < 1000; i++ {
743 level := randomLevel()
744 if level < 1 || level > SKIPLIST_MAX_LEVEL {
745 t.Errorf("Generated level out of range: %v", level)
746 }
747 }
748}
749func TestZSetNodes_InsertNode(t *testing.T) {
750 pq := &FZSet{}
751

Callers

nothing calls this directly

Calls 1

randomLevelFunction · 0.85

Tested by

no test coverage detected