Example #1
0
        public void Backing_Len_Correct()
        {
            var a = new VarBitArray(10, 13);

            Assert.Equal(3, a.Backing.Length);
            Assert.Equal(10, a.Length);
        }
Example #2
0
        public void Set_Get_Consistent()
        {
            var a = new VarBitArray(10, 5);

            Assert.Equal(0UL, a[1]);
            a[4] = 4;
            Assert.Equal(4UL, a[4]);
            a[9] = 30;
            Assert.Equal(30UL, a[9]);
        }
Example #3
0
        public void Throws_OutOfRange()
        {
            var a = new VarBitArray(10, 13);

            Assert.Throws <IndexOutOfRangeException>(() => a[10] = 10);
        }