Esempio n. 1
0
        public void Test_SubGridTreeLeafBitmapSubGrid_CountBits()
        {
            var leaf = new SubGridTreeLeafBitmapSubGrid();

            leaf.CountBits().Should().Be(0);
            leaf.Bits.SetBit(0, 0);
            leaf.CountBits().Should().Be(1);
            leaf.Bits.SetBit(SubGridTreeConsts.SubGridTreeDimensionMinus1, 0);
            leaf.CountBits().Should().Be(2);
            leaf.Bits.SetBit(0, SubGridTreeConsts.SubGridTreeDimensionMinus1);
            leaf.CountBits().Should().Be(3);
            leaf.Bits.SetBit(SubGridTreeConsts.SubGridTreeDimensionMinus1, SubGridTreeConsts.SubGridTreeDimensionMinus1);
            leaf.CountBits().Should().Be(4);
        }
Esempio n. 2
0
        public void Test_SubGridTreeLeafBitmapSubGrid_ForEach_ForEach2()
        {
            var leaf = new SubGridTreeLeafBitmapSubGrid();

            leaf.ForEach((x, y) => x == y);
            leaf.CountBits().Should().Be(SubGridTreeConsts.SubGridTreeDimension);
        }