Exemplo n.º 1
0
 def test_part2(self):
     print(
         "Day 19 Part 2: This test is slow, comment out for a faster feedback loop"
     )
     program = parse("../../19/input.txt")
     d19 = Day19(program)
     got = d19.part2()
     want = 15641348
     self.assertEqual(got, want)
Exemplo n.º 2
0
 def test_part2(self):
     print(
         "Day 21 Part 2: This test is slow, comment out for a faster feedback loop"
     )
     program = parse("../../21/input.txt")
     d21 = Day21(program)
     got = d21.part2()
     want = 1143356492
     self.assertEqual(got, want)
Exemplo n.º 3
0
 def test_day5_part2(self):
     file_data = parse("../../05/input.txt")
     got = solve1(file_data, [5])
     want = [11956381]
     self.assertEqual(want, got)
Exemplo n.º 4
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)
Exemplo n.º 5
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)
Exemplo n.º 6
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)
Exemplo n.º 7
0
 def test_part2(self):
     file_data = parse("../../09/input.txt")
     outputs = solve1(file_data, [2])
     self.assertEqual(outputs, [33343])
Exemplo n.º 8
0
 def test_part1(self):
     file_data = parse("../../09/input.txt")
     outputs = solve1(file_data, [1])
     self.assertEqual(outputs, [3780860499])
Exemplo n.º 9
0
 def test_part2(self):
     program = parse("../../11/input.txt")
     got = PainterRobot.part1(program, initial_color=1)
     self.assertEqual(got, 249)
Exemplo n.º 10
0
 def test_part1(self):
     program = parse("../../11/input.txt")
     got = PainterRobot.part1(program)
     self.assertEqual(got, 2539)
Exemplo n.º 11
0
 def test_part2(self):
     program = parse("../../13/input.txt")
     got = Breakout.part1(program)
     self.assertEqual(got, 270)
Exemplo n.º 12
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)
Exemplo n.º 13
0
 def test_part2(self):
     program = parse("../../17/input.txt")
     droid = Day17Droid(program)
     got = droid.part2()
     want = 1063081
     self.assertEqual(want, got)
Exemplo n.º 14
0
 def test_part1(self):
     program = parse("../../19/input.txt")
     d19 = Day19(program)
     got = d19.part1()
     want = 141
     self.assertEqual(got, want)
Exemplo n.º 15
0
 def test_part1(self):
     program = parse("../../21/input.txt")
     d21 = Day21(program)
     got = d21.part1()
     want = 19358870
     self.assertEqual(got, want)
Exemplo n.º 16
0
 def test_part1_and2(self):
     program = parse("../../23/input.txt")
     d23 = Day23(program)
     p1, p2 = d23.execute()
     self.assertEqual(p1, 22134)
     self.assertEqual(p2, 16084)