private void assert(bool[] expectedBits, BigBitSet bits)
 {
     for (int bitIndex = 0; bitIndex < bits.BitsCount; bitIndex++)
     {
         Assert.AreEqual(expectedBits[bitIndex], bits[bitIndex]);
     }
 }
        public void TestBigBitSet()
        {
            var bits = new BigBitSet(1);

            assert(bits);
            bits = new BigBitSet(32);
            assert(bits);
            bits = new BigBitSet(33);
            assert(bits);
            bits = new BigBitSet(64);
            assert(bits);
            bits = new BigBitSet(65);
            assert(bits);
        }
        private void assert(BigBitSet bits)
        {
            var expectedBits = new bool[bits.BitsCount];

            for (int bitIndex = 0; bitIndex < bits.BitsCount; bitIndex++)
            {
                bits[bitIndex]         = true;
                expectedBits[bitIndex] = true;
                assert(expectedBits, bits);
            }
            for (int bitIndex = 0; bitIndex < bits.BitsCount; bitIndex++)
            {
                bits[bitIndex]         = false;
                expectedBits[bitIndex] = false;
                assert(expectedBits, bits);
            }
        }