Esempio n. 1
0
        public void TuronOnAllTest()
        {
            var expected = 1000000;
            var actual   = Day06.CountLights(Day06.ToggleLights(new bool[1000, 1000], "turn on 0,0 through 999,999"));

            Assert.Equal(expected, actual);
        }
Esempio n. 2
0
        public void TurnOnAllThenOffMiddleFourTest()
        {
            var expected = 1000000 - 4;

            var lights = Day06.ToggleLights(new bool[1000, 1000], "turn on 0,0 through 999,999");

            Assert.Equal(1000000, Day06.CountLights(lights));

            lights = Day06.ToggleLights(lights, "turn off 499,499 through 500,500");
            Assert.Equal(expected, Day06.CountLights(lights));
        }