Skip to content

Commit a9a1a47

Browse files
committed
using UnsetClosed
1 parent 9695445 commit a9a1a47

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

iter_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ func TestValues(t *testing.T) {
120120
assert.Equal(t, testSize, n)
121121
}
122122

123-
func TestUnset(t *testing.T) {
123+
func TestUnsetClosed(t *testing.T) {
124124
t.Run("empty bitmap", func(t *testing.T) {
125125
b := New()
126-
it := Unset(b, 5, 10)
126+
it := UnsetClosed(b, 5, 10)
127127

128128
expected := []uint32{5, 6, 7, 8, 9, 10}
129129
actual := make([]uint32, 0)
@@ -142,7 +142,7 @@ func TestUnset(t *testing.T) {
142142
b.AddInt(7)
143143
b.AddInt(12)
144144

145-
it := Unset(b, 5, 10)
145+
it := UnsetClosed(b, 5, 10)
146146

147147
expected := []uint32{5, 6, 8, 9, 10}
148148
actual := make([]uint32, 0)
@@ -161,7 +161,7 @@ func TestUnset(t *testing.T) {
161161
b.AddInt(2)
162162
b.AddInt(3)
163163

164-
it := Unset(b, 10, 15)
164+
it := UnsetClosed(b, 10, 15)
165165

166166
expected := []uint32{10, 11, 12, 13, 14, 15}
167167
actual := make([]uint32, 0)
@@ -180,7 +180,7 @@ func TestUnset(t *testing.T) {
180180
b.AddInt(8)
181181
b.AddInt(9)
182182

183-
it := Unset(b, 3, 12)
183+
it := UnsetClosed(b, 3, 12)
184184

185185
expected := []uint32{3, 4, 6, 7, 10, 11, 12}
186186
actual := make([]uint32, 0)
@@ -195,7 +195,7 @@ func TestUnset(t *testing.T) {
195195

196196
t.Run("min greater than max", func(t *testing.T) {
197197
b := New()
198-
it := Unset(b, 10, 5)
198+
it := UnsetClosed(b, 10, 5)
199199

200200
count := 0
201201
it(func(val uint32) bool {
@@ -210,7 +210,7 @@ func TestUnset(t *testing.T) {
210210
b := New()
211211
b.AddInt(5)
212212

213-
it := Unset(b, 3, 3)
213+
it := UnsetClosed(b, 3, 3)
214214

215215
expected := []uint32{3}
216216
actual := make([]uint32, 0)
@@ -227,7 +227,7 @@ func TestUnset(t *testing.T) {
227227
b := New()
228228
b.AddInt(5)
229229

230-
it := Unset(b, 5, 5)
230+
it := UnsetClosed(b, 5, 5)
231231

232232
count := 0
233233
it(func(val uint32) bool {
@@ -241,7 +241,7 @@ func TestUnset(t *testing.T) {
241241
t.Run("early termination", func(t *testing.T) {
242242
b := New()
243243

244-
it := Unset(b, 1, 10)
244+
it := UnsetClosed(b, 1, 10)
245245

246246
actual := make([]uint32, 0)
247247
it(func(val uint32) bool {
@@ -259,7 +259,7 @@ func TestUnset(t *testing.T) {
259259
b.AddInt(500)
260260
b.AddInt(1000)
261261

262-
it := Unset(b, 50, 150)
262+
it := UnsetClosed(b, 50, 150)
263263

264264
actual := make([]uint32, 0)
265265
it(func(val uint32) bool {
@@ -280,7 +280,7 @@ func TestUnset(t *testing.T) {
280280
b := New()
281281
b.AddInt(100)
282282

283-
it := Unset(b, 100, 105)
283+
it := UnsetClosed(b, 100, 105)
284284

285285
actual := make([]uint32, 0)
286286
it(func(val uint32) bool {
@@ -296,7 +296,7 @@ func TestUnset(t *testing.T) {
296296
b := New()
297297
b.Add(4294967295)
298298

299-
it := Unset(b, 4294967294, 4294967295)
299+
it := UnsetClosed(b, 4294967294, 4294967295)
300300

301301
actual := make([]uint32, 0)
302302
it(func(val uint32) bool {

0 commit comments

Comments
 (0)