MCPcopy
hub / github.com/Workiva/go-datastructures / TestClearCompressedBitArray

Function TestClearCompressedBitArray

bitarray/sparse_bitarray_test.go:181–199  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

179}
180
181func TestClearCompressedBitArray(t *testing.T) {
182 ba := newSparseBitArray()
183 ba.SetBit(5)
184 ba.SetBit(s * 2)
185
186 result, err := ba.GetBit(5)
187 assert.Nil(t, err)
188 assert.True(t, result)
189 result, _ = ba.GetBit(s * 2)
190 assert.True(t, result)
191
192 ba.Reset()
193
194 result, err = ba.GetBit(5)
195 assert.Nil(t, err)
196 assert.False(t, result)
197 result, _ = ba.GetBit(s * 2)
198 assert.False(t, result)
199}
200
201func TestCompressedEquals(t *testing.T) {
202 ba := newSparseBitArray()

Callers

nothing calls this directly

Calls 4

newSparseBitArrayFunction · 0.85
SetBitMethod · 0.65
GetBitMethod · 0.65
ResetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…