Ejemplo n.º 1
0
 def test_example(self):
     test_input = """
         cpy 41 a
         inc a
         inc a
         dec a
         jnz a 2
         dec a
         """
     s = Solver(from_str=test_input)
     self.assertEqual(s.solve_part_one(), 42)
Ejemplo n.º 2
0
    def test_example_one(self):
        example_input = """
            initial state: #..#.#..##......###...###

            ...## => #
            ..#.. => #
            .#... => #
            .#.#. => #
            .#.## => #
            .##.. => #
            .#### => #
            #.#.# => #
            #.### => #
            ##.#. => #
            ##.## => #
            ###.. => #
            ###.# => #
            ####. => #
            """
        s = Solver(from_str=example_input)
        one = s.solve_part_one()
        self.assertEqual(one, 325)