public void Day01_Part2_Examples() { var d = new Day01(); Assert.AreEqual(1, d.SolutionPart2(")")); Assert.AreEqual(5, d.SolutionPart2("()())")); }
public void Day01_Part2_Solution() { var d = new Day01(); var input = FileHelper.ReadTestFile(1); Assert.IsNotNull(input); var expected = 1797; var actual = d.SolutionPart2(input); Assert.AreEqual(expected, actual); }
public void Day01_Part1_Examples() { var d = new Day01(); Assert.AreEqual(0, d.SolutionPart1("(())")); Assert.AreEqual(0, d.SolutionPart1("()()")); Assert.AreEqual(3, d.SolutionPart1("(((")); Assert.AreEqual(3, d.SolutionPart1("(()(()(")); Assert.AreEqual(3, d.SolutionPart1("))(((((")); Assert.AreEqual(-1, d.SolutionPart1("())")); Assert.AreEqual(-1, d.SolutionPart1("))(")); Assert.AreEqual(-3, d.SolutionPart1(")))")); Assert.AreEqual(-3, d.SolutionPart1(")())())")); }