コード例 #1
0
        public void Day03_Part2_Examples()
        {
            var d = new Day03();

            Assert.AreEqual(3, d.SolutionPart2("^v"));
            Assert.AreEqual(11, d.SolutionPart2("^v^v^v^v^v"));
        }
コード例 #2
0
        public void Day03_Part1_Examples()
        {
            var d = new Day03();

            Assert.AreEqual(2, d.SolutionPart1(">"));
            Assert.AreEqual(4, d.SolutionPart1("^>v<"));
            Assert.AreEqual(2, d.SolutionPart1("^v^v^v^v^v"));
        }
コード例 #3
0
        public void Day03_Part2_Solution()
        {
            var d = new Day03();

            var input = FileHelper.ReadTestFile(3);
            Assert.IsNotNull(input);

            var expected = 2631;
            var actual = d.SolutionPart2(input);

            Assert.AreEqual(expected, actual);
        }