Exemplo n.º 1
0
        public void BitScanForwardTest()
        {
            var index = BitBoardHelper.BitScanForward(1);

            Assert.AreEqual(0, index);
            index = BitBoardHelper.BitScanForward(128);
            Assert.AreEqual(7, index);
            index = BitBoardHelper.BitScanForward((ulong)Math.Pow(2, 27));
            Assert.AreEqual(27, index);
            index = BitBoardHelper.BitScanForward((ulong)Math.Pow(2, 64));
            Assert.AreEqual(63, index);
        }