func CheckInvariants(t *testing.T, msg string, s *Set) {
	len := len(s.data)
	cap := cap(s.data)
	data := s.data[:cap]
	m := "Invariant for "
	if len > 0 && data[len-1] == 0 {
		t.Errorf("%s%s: data = %v, data[%d] = 0; want non-zero", m, msg, data, len-1)
	}
	for i := len; i < cap; i++ {
		if data[i] != 0 {
			t.Errorf("%s%s: data = %v, data[%d] = %#x; want 0", m, msg, data, i, data[i])
			break
		}
	}
}
CheckInvariants checks that the invariants for s.data hold.
package bit
import (
	"reflect"
	"strconv"
	"testing"
)