def test_one(self): test_string = """ 5 1 9 5 7 5 3 2 4 6 8 """ self.assertEqual(solution_part_one(test_string), 18)
def test_one(self): problem_input = "\n".join([ "abcdef", "bababc", "abbcde", "abcccd", "aabcdd", "abcdee", "ababab", ]) self.assertEqual(solution_part_one(problem_input), 12)
def test_one(self): program_input = """pbga (66) xhth (57) ebii (61) havc (66) ktlj (57) fwft (72) -> ktlj, cntj, xhth qoyq (66) padx (45) -> pbga, havc, qoyq tknk (41) -> ugml, padx, fwft jptl (61) ugml (68) -> gyxo, ebii, jptl gyxo (61) cntj (57)""" self.assertEqual(solution_part_one(program_input), "tknk")
def test_one(self): self.assertEqual(solution_part_one([0, 3, 0, 1, -3]), 5)
def test_one(self): self.assertEqual(solution_part_one("ne,ne,ne"), 3)
def test_three(self): self.assertEqual(solution_part_one("ne,ne,s,s"), 2)
def test_one(self): self.assertEqual( solution_part_one("2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2"), 138)
def test_one(self): self.assertEqual(solution_part_one(TEST_INPUT), 24)
def test_three(self): problem_input = "\n".join(["-1", "-2", "-3"]) self.assertEqual(-6, solution_part_one(problem_input))
def test_two(self): self.assertEqual(solution_part_one(12), 3)
def test_one(self): self.assertEqual(solution_part_one(1), 0)
def test_four(self): self.assertEqual(solution_part_one(1024), 31)
def test_three(self): self.assertEqual(solution_part_one(23), 2)
def test_one(self): self.assertEqual(solution_part_one(a=65, b=8921), 588)
def test_one(self): self.assertEqual(solution_part_one(PROBLEM_INPUT), 240)
def test_one(self): self.assertEqual(solution_part_one("aa bb cc dd ee"), 1)
def test_two(self): self.assertEqual(solution_part_one("aa bb cc dd aa"), 0)
def test_3(self): self.assertEqual(solution_part_one(players=13, largest_marble=7999), 146373)
def test_one(self): problem_input = "\n".join(["+1", "+1", "+1"]) self.assertEqual(3, solution_part_one(problem_input))
def test_4(self): self.assertEqual(solution_part_one(players=17, largest_marble=1104), 2764)
def test_one(self): self.assertEqual(solution_part_one(3), 638)
def test_5(self): self.assertEqual(solution_part_one(players=21, largest_marble=6111), 54718)
def test_one(self): program_input = """b inc 5 if a > 1 a inc 1 if b < 5 c dec -10 if a >= 1 c inc -20 if c == 10""" self.assertEqual(solution_part_one(program_input), 1)
def test_6(self): self.assertEqual(solution_part_one(players=30, largest_marble=5807), 37305)
def test_four(self): self.assertEqual(solution_part_one("se,sw,se,sw,sw"), 3)
def test_1(self): self.assertEqual(solution_part_one(players=9, largest_marble=25), 32)
def test_two(self): self.assertEqual(solution_part_one("ne,ne,sw,sw"), 0)
def test_2(self): self.assertEqual(solution_part_one(players=10, largest_marble=1618), 8317)
def test_three(self): self.assertEqual(solution_part_one("aa bb cc dd aaa"), 1)
def test_one(self): self.assertEqual(solution_part_one([0, 2, 7, 1]), 5)