Пример #1
0
        public void Day08_Part1_Examples()
        {
            var d = new Day08();

            Assert.AreEqual(2, d.SolutionPart1("\"\""));
            Assert.AreEqual(2, d.SolutionPart1("\"abc\""));
            Assert.AreEqual(3, d.SolutionPart1("\"aaa\\\"aaa\""));
            Assert.AreEqual(5, d.SolutionPart1("\"\\x27\""));
        }
Пример #2
0
        public void Day08_Part1_Solution()
        {
            var d = new Day08();

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

            var expected = 1371;
            var actual = d.SolutionPart1(input);

            Assert.AreEqual(expected, actual);
        }