예제 #1
0
        public void CastImplicitlyFromString0001()
        {
            BitboardStateRow stateRow = "0001";
            ushort           expected = 1;

            Assert.Equal(expected, stateRow.Value);
        }
예제 #2
0
        public void NotAllowValuesGreaterThan511()
        {
            BitboardStateRow stateRow = new BitboardStateRow(0x200);
            ushort           expected = 0;

            Assert.Equal(expected, stateRow.Value);
        }
예제 #3
0
        public void CastImplicitlyFromString0010()
        {
            BitboardStateRow stateRow = 0b0010;
            ushort           expected = 2;

            Assert.Equal(expected, stateRow.Value);
        }
예제 #4
0
        public void BeAbleToFlipBits()
        {
            BitboardStateRow expectedStateRow = "011111111";
            BitboardStateRow stateRow         = "100000000";

            var actualStateRow = ~stateRow;

            Assert.Equal(expectedStateRow, actualStateRow);
        }