MCPcopy
hub / github.com/RoaringBitmap/roaring / TestArrayContainerIand

Function TestArrayContainerIand

arraycontainer_test.go:361–372  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

359}
360
361func TestArrayContainerIand(t *testing.T) {
362 a := NewBitmap()
363 a.AddRange(0, 200000)
364 b := BitmapOf(50, 100000, 150000)
365 b.And(a)
366 r := b.ToArray()
367
368 assert.Len(t, r, 3)
369 assert.EqualValues(t, 50, r[0])
370 assert.EqualValues(t, 100000, r[1])
371 assert.EqualValues(t, 150000, r[2])
372}
373
374func TestArrayIteratorPeekNext(t *testing.T) {
375 testContainerIteratorPeekNext(t, newArrayContainer())

Callers

nothing calls this directly

Calls 6

AddRangeMethod · 0.95
NewBitmapFunction · 0.70
BitmapOfFunction · 0.70
AndMethod · 0.45
ToArrayMethod · 0.45
LenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…