UNPKG

319 BJavaScriptView Raw
1/**
2 * Imports
3 */
4
5import test from 'tape'
6import {createBv, getBit, setBit, clearBit} from '../src'
7
8/**
9 * Tests
10 */
11
12test('should work', t => {
13 const bv = createBv(8)
14
15 setBit(bv, 3)
16
17 t.equal(getBit(bv, 3), true)
18 t.equal(getBit(bv, 4), false)
19
20 clearBit(bv, 3)
21 t.equal(getBit(bv, 3), false)
22
23 t.end()
24})