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

Function TestAddCheckedRemove64

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

Source from the content-addressed store, hash-verified

1929}
1930
1931func TestAddCheckedRemove64(t *testing.T) {
1932 array := []uint64{123, 0xA00000000A, 0xAFFFFFFF7, 0xFFFFFFFFF}
1933 bmp := New()
1934 for _, v := range array {
1935 assert.True(t, bmp.CheckedAdd(v))
1936 assert.False(t, bmp.CheckedAdd(v))
1937 }
1938 for _, v := range array {
1939 assert.True(t, bmp.CheckedRemove(v))
1940 assert.False(t, bmp.CheckedRemove(v))
1941 }
1942 assert.True(t, bmp.IsEmpty())
1943}
1944
1945func TestClear64(t *testing.T) {
1946 array := []uint64{123, 0xA00000000A, 0xAFFFFFFF7, 0xFFFFFFFFF}

Callers

nothing calls this directly

Calls 4

NewFunction · 0.70
CheckedAddMethod · 0.45
CheckedRemoveMethod · 0.45
IsEmptyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…