示例#1
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)
示例#2
0
 def test_day5_part2(self):
     file_data = parse("../../05/input.txt")
     got = solve1(file_data, [5])
     want = [11956381]
     self.assertEqual(want, got)
示例#3
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)
示例#4
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)
示例#5
0
 def test_part1(self):
     file_data = parse("../../09/input.txt")
     outputs = solve1(file_data, [1])
     self.assertEqual(outputs, [3780860499])
示例#6
0
 def test_part2(self):
     file_data = parse("../../09/input.txt")
     outputs = solve1(file_data, [2])
     self.assertEqual(outputs, [33343])
示例#7
0
 def test_part2(self):
     program = parse("../../11/input.txt")
     got = PainterRobot.part1(program, initial_color=1)
     self.assertEqual(got, 249)
示例#8
0
 def test_part1(self):
     program = parse("../../11/input.txt")
     got = PainterRobot.part1(program)
     self.assertEqual(got, 2539)
示例#9
0
 def test_part2(self):
     program = parse("../../13/input.txt")
     got = Breakout.part1(program)
     self.assertEqual(got, 270)
示例#10
0
 def test_part1_and2(self):
     program = parse("../../15/input.txt")
     p1, p2 = Day15.part1_and_2(program)
     self.assertEqual(p1, 226)
     self.assertEqual(p2, 342)
示例#11
0
 def test_part2(self):
     program = parse("../../17/input.txt")
     droid = Day17Droid(program)
     got = droid.part2()
     want = 1063081
     self.assertEqual(want, got)