MCPcopy Index your code
hub / github.com/Workiva/go-datastructures / TestCompressedIntersects

Function TestCompressedIntersects

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

Source from the content-addressed store, hash-verified

215}
216
217func TestCompressedIntersects(t *testing.T) {
218 ba := newSparseBitArray()
219 other := newSparseBitArray()
220
221 assert.True(t, ba.Intersects(other))
222
223 other.SetBit(5)
224
225 assert.False(t, ba.Intersects(other))
226 assert.True(t, other.Intersects(ba))
227
228 ba.SetBit(5)
229
230 assert.True(t, ba.Intersects(other))
231 assert.True(t, other.Intersects(ba))
232
233 other.SetBit(10)
234
235 assert.False(t, ba.Intersects(other))
236 assert.True(t, other.Intersects(ba))
237}
238
239func TestLongCompressedIntersects(t *testing.T) {
240 ba := newSparseBitArray()

Callers

nothing calls this directly

Calls 3

newSparseBitArrayFunction · 0.85
IntersectsMethod · 0.65
SetBitMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…