bitseq failing test

This commit is contained in:
Jacek Sieka 2019-08-19 16:35:16 +02:00 committed by zah
parent 4f685ab7ec
commit 3689c58d1b

View File

@ -56,3 +56,15 @@ suite "Bit fields":
check a[j] == (j == 0)
check b[j] == (j == 1)
test "overlaps":
for bitCount in [63, 62]:
checkpoint &"trying bit count {bitCount}"
var
a = BitSeq.init(bitCount)
b = BitSeq.init(bitCount)
a.raiseBit(4)
b.raiseBit(5)
check:
not a.overlaps(b)
not b.overlaps(a)