We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c60edc5 commit ae117dcCopy full SHA for ae117dc
roaring_test.go
@@ -1827,6 +1827,20 @@ func TestBitmap(t *testing.T) {
1827
1828
assert.True(t, valide)
1829
})
1830
+
1831
+ t.Run("ToExistingArray-Test", func(t *testing.T) {
1832
+ values := make([]uint32, 0, 110)
1833
+ rb := NewBitmap()
1834
1835
+ for i := 10; i < 120; i++ {
1836
+ values = append(values, uint32(i))
1837
+ }
1838
+ rb.AddMany(values)
1839
+ assert.Equal(t, values, rb.ToArray())
1840
+ existing := make([]uint32, len(values))
1841
+ buf := rb.ToExistingArray(&existing)
1842
+ assert.Equal(t, values, *buf)
1843
+ })
1844
}
1845
1846
func TestXORtest4(t *testing.T) {
0 commit comments