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

Function TestArrayContainerIaddRangeNearMax068

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

Source from the content-addressed store, hash-verified

241}
242
243func TestArrayContainerIaddRangeNearMax068(t *testing.T) {
244 iv := []interval16{
245 newInterval16Range(65525, 65527),
246 newInterval16Range(65530, 65530),
247 newInterval16Range(65534, 65535),
248 }
249 rc := newRunContainer16TakeOwnership(iv)
250
251 ac2 := rc.toArrayContainer()
252
253 assert.True(t, ac2.equals(rc))
254 assert.True(t, rc.equals(ac2))
255
256 ac := newArrayContainer()
257 endx := int(MaxUint16) + 1
258 first := endx - 3
259 ac.iaddRange(first-20, endx-20)
260 ac.iaddRange(first-6, endx-6)
261 ac.iaddRange(first, endx)
262
263 assert.Equal(t, 9, ac.getCardinality())
264}
265
266func TestArrayContainerEtc070(t *testing.T) {
267 iv := []interval16{

Callers

nothing calls this directly

Calls 7

newInterval16RangeFunction · 0.85
newArrayContainerFunction · 0.85
equalsMethod · 0.65
iaddRangeMethod · 0.65
getCardinalityMethod · 0.65
toArrayContainerMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…