Example #1
0
 def test_day5_part2(self):
     file_data = parse("../../05/input.txt")
     got = solve1(file_data, [5])
     want = [11956381]
     self.assertEqual(want, got)
Example #2
0
 def test_part2(self):
     file_data = parse("../../07/input.txt")
     [max_val, max_seq] = amplify_loop_max_seq(file_data)
     self.assertEqual(max_val, 12932154)
Example #3
0
 def test_day5_part1(self):
     file_data = parse("../../05/input.txt")
     got = solve1(file_data, [1])
     want = [0, 0, 0, 0, 0, 0, 0, 0, 0, 5821753]
     self.assertEqual(want, got)
Example #4
0
 def test_part2(self):
     file_data = parse("../../09/input.txt")
     outputs = solve1(file_data, [2])
     self.assertEqual(outputs, [33343])
Example #5
0
 def test_part1(self):
     file_data = parse("../../07/input.txt")
     [max_val, max_seq] = amplify_once_find_max_seq(file_data)
     self.assertEqual(max_val, 13848)
Example #6
0
 def test_part1(self):
     file_data = parse("../../09/input.txt")
     outputs = solve1(file_data, [1])
     self.assertEqual(outputs, [3780860499])
Example #7
0
 def test_part2(self):
     program = parse("../../11/input.txt")
     got = PainterRobot.part1(program, initial_color=1)
     self.assertEqual(got, 249)
Example #8
0
 def test_part1(self):
     program = parse("../../11/input.txt")
     got = PainterRobot.part1(program)
     self.assertEqual(got, 2539)
Example #9
0
 def test_part2(self):
     program = parse("../../13/input.txt")
     got = Breakout.part1(program)
     self.assertEqual(got, 270)
Example #10
0
 def test_pass2(self):
     data = puzzle.parse(read_file("13", "1"))
     result = puzzle.solve2(data)
     print(f"Solution: {result}")
     self.assertEqual(result, 205)