aboutsummaryrefslogtreecommitdiff
path: root/bitfield/bitfield_test.go
blob: 685881c3089e1cdae7bb3987c398bf9779efd259 (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("want set, got not")
	}
	bf.Clear(7)
	if bf.At(7) {
		t.Error("want cleared, got not")
	}
	t.Log("len:", len(bf), bf, bf.At(7))
}