aboutsummaryrefslogtreecommitdiff
path: root/bitfield/bitfield_test.go
blob: 4b7218a738ec4875844c40b211bd2f487baa6cd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package bitfield

import "testing"

func TestNew(t *testing.T) {
	bf := New(63)
	bf.Set(7)
	if !bf.At(7) {
		t.Error("expected set")
	}
	bf.Clear(7)
	if bf.At(7) {
		t.Error("expected cleared")
	}
	t.Log("len:", len(bf), bf, bf.At(7))
}