public void Part1() { var day5 = new Day5(); var actual = day5.ExecuteToEnd("0 3 0 1 -3", 0, x => ++ x); Assert.Equal(5, actual); }
public void Part2() { var day5 = new Day5(); var actual = day5.ExecuteToEnd("0 3 0 1 -3", 0, x => (x >= 3 ? --x : ++x)); Assert.Equal(10, actual); }
public void Part2_Answer() { var day5 = new Day5(); var actual = day5.ExecuteToEnd(TEST_INPUT, 0, x => (x >= 3 ? --x : ++x)); Assert.Equal(26948068, actual); }
private void TestSeatReverser() { var reverse = Day5.ReverseSeatId(567); Assert.Equal(70, reverse.row); Assert.Equal(7, reverse.col); }
public void Part1_Answer() { var day5 = new Day5(); var actual = day5.ExecuteToEnd(TEST_INPUT, 0, x => ++ x); Assert.Equal(355965, actual); }
public void Day5Part1() { Day5 day5 = new Day5("C:\\advent-of-code\\input-day5.txt"); string answer = day5.FinalAnswerPart1(); Assert.Equal("822", answer); }
public void Test1(string firstInput, int thirdParamMode, int secondParamMode, int firstParamMode, int opCode) { var result = new Day5().GetParameters(firstInput); Assert.Equal(opCode, result.opCode); Assert.Equal(firstParamMode, result.firstParameterMode); Assert.Equal(secondParamMode, result.secondParameterMode); Assert.Equal(thirdParamMode, result.thirdParameterMode); }
public void Part1() { Assert.AreEqual(567, Day5.GetSeatId("BFFFBBFRRR")); Assert.AreEqual(119, Day5.GetSeatId("FFFBBBFRRR")); Assert.AreEqual(820, Day5.GetSeatId("BBFFBBFRLL")); Assert.AreEqual(820, new Day5(TestInput).Part1()); Assert.AreEqual(915, new Day5(null).Part1()); }
public void Day05Part1Test() { var day5 = new Day5(); var actual = day5.Part1(); var expected = 922; Assert.AreEqual(expected, actual); }
public void Problem2() { Assert.AreEqual(597, Day5.Problem2()); }
public void Problem1() { Assert.AreEqual(801, Day5.Problem1()); }
private void TestParser(string seatString, int row, int column, int id) { Assert.Equal(row, Day5.GetRowFromSeatString(seatString)); Assert.Equal(column, Day5.GetColumnFromSeatString(seatString)); Assert.Equal(id, Day5.GetSeatId(row, column)); }