MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / TestEmptyFull

Function TestEmptyFull

libs/bits/bit_array_test.go:175–189  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

173}
174
175func TestEmptyFull(t *testing.T) {
176 ns := []int{47, 123}
177 for _, n := range ns {
178 bA := NewBitArray(n)
179 if !bA.IsEmpty() {
180 t.Fatal("Expected bit array to be empty")
181 }
182 for i := 0; i < n; i++ {
183 bA.SetIndex(i, true)
184 }
185 if !bA.IsFull() {
186 t.Fatal("Expected bit array to be full")
187 }
188 }
189}
190
191func TestUpdateNeverPanics(t *testing.T) {
192 newRandBitArray := func(n int) *BitArray {

Callers

nothing calls this directly

Calls 4

IsEmptyMethod · 0.95
SetIndexMethod · 0.95
IsFullMethod · 0.95
NewBitArrayFunction · 0.85

Tested by

no test coverage detected