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

Function Test64BitValues

roaring64/roaring64_test.go:1973–1993  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1971}
1972
1973func Test64BitValues(t *testing.T) {
1974 bmp := New()
1975 bmp.SetCopyOnWrite(true)
1976 for i := 100; i < 1000; i++ {
1977 bmp.Add(uint64(i))
1978 }
1979 var i uint64
1980 for i = 14000000000000000100; i < 14000000000000001000; i++ {
1981 bmp.Add(i)
1982 }
1983 assert.True(t, bmp.Contains(uint64(14000000000000000500)))
1984 array := []uint64{5, 1, 2, 234294967296, 195839473298, 14000000000000000100}
1985 bmp2 := New()
1986 bmp2.AddMany(array)
1987 v, err := bmp2.Select(uint64(5))
1988 assert.Nil(t, err)
1989 assert.True(t, v == uint64(14000000000000000100))
1990 assert.True(t, bmp2.Minimum() == uint64(1))
1991 assert.True(t, bmp2.Maximum() == uint64(14000000000000000100))
1992 assert.True(t, bmp2.Rank(uint64(195839473298)) == uint64(4))
1993}
1994
1995func IntsEquals(a, b []uint64) bool {
1996 if len(a) != len(b) {

Callers

nothing calls this directly

Calls 9

NewFunction · 0.70
SetCopyOnWriteMethod · 0.45
AddMethod · 0.45
ContainsMethod · 0.45
AddManyMethod · 0.45
SelectMethod · 0.45
MinimumMethod · 0.45
MaximumMethod · 0.45
RankMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…