bug fix: bit map for each bit

This commit is contained in:
finley
2023-02-08 22:35:49 +08:00
parent fe20c6c9e1
commit 85ce68768a
2 changed files with 6 additions and 3 deletions

View File

@@ -67,7 +67,7 @@ func TestForEachBit(t *testing.T) {
}
expectOffset := int64(100)
count := 0
bm.ForEachBit(100, 200, func(offset int64, val byte) bool {
bm.ForEachBit(100, 201, func(offset int64, val byte) bool {
if offset != expectOffset {
t.Error("wrong offset")
}
@@ -78,7 +78,7 @@ func TestForEachBit(t *testing.T) {
count++
return true
})
if count != 100 {
if count != 101 {
t.Error("wrong count")
}
bm = New()