mafintosh / indexed-bitfield

Indexed bitfield that allows you to search for bits efficiently
MIT License
47 stars 6 forks source link

test 'some + every' fails when init bitfield with size greater than 1024 #2

Open ZhouHansen opened 5 years ago

ZhouHansen commented 5 years ago

Change the size from 1000 to 1025

tape('some + every', function (t) {
  const bits = bitfield(1025)
  //...
})

Then these two lines fail. https://github.com/mafintosh/indexed-bitfield/blob/5cc744e8cdf7cdbff0bf94fc4447d10d338f475b/test.js#L111

https://github.com/mafintosh/indexed-bitfield/blob/5cc744e8cdf7cdbff0bf94fc4447d10d338f475b/test.js#L108

not ok 258 should be falsy
  ---
    operator: notOk
    expected: false
    actual:   true

not ok 261 should be truthy
  ---
    operator: ok
    expected: true
    actual:   false