You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// ValidateBasic validates a BitArray. Note that a nil BitArray and BitArray of
505
+
// size 0 bits is valid. However the number of Bits and Elems be valid based on
506
+
// each other.
507
+
func (bA*BitArray) ValidateBasic() error {
508
+
ifbA==nil {
509
+
returnnil
510
+
}
511
+
512
+
expectedElems:=numElements(bA.Size())
513
+
ifexpectedElems!=len(bA.Elems) {
514
+
returnfmt.Errorf("mismatch between specified number of bits %d, and number of elements %d, expected %d elements", bA.Size(), len(bA.Elems), expectedElems)
0 commit comments