MCPcopy Create free account
hub / github.com/RoaringBitmap/roaring / TestFromDense

Function TestFromDense

roaring_test.go:3310–3327  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3308}
3309
3310func TestFromDense(t *testing.T) {
3311 testDense(func(name string, rb *Bitmap) {
3312 for _, doCopy := range []bool{false, true} {
3313 t.Run(fmt.Sprintf("%s,doCopy=%t", name, doCopy), func(t *testing.T) {
3314 dense := rb.ToDense()
3315 cp := FromDense(dense, doCopy)
3316 if doCopy {
3317 // Clear the original dense slice to ensure we don't have any
3318 // references to it
3319 for i := range dense {
3320 dense[i] = 0
3321 }
3322 }
3323 assert.True(t, rb.Equals(cp))
3324 })
3325 }
3326 })
3327}
3328
3329func TestFromBitSet(t *testing.T) {
3330 testDense(func(name string, rb *Bitmap) {

Callers

nothing calls this directly

Calls 4

testDenseFunction · 0.85
FromDenseFunction · 0.85
ToDenseMethod · 0.80
EqualsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…