Exemplo n.º 1
0
 def test_part2_input(self):
     result = day05.part2(aoc.read_input('day05.input'))
     self.assertEqual(result, 6136)
Exemplo n.º 2
0
def test_day05_part2_longer(test_input, output):
    program = ('3,21,1008,21,8,20,1005,20,22,107,8,21,20,1006,20,31,'
               '1106,0,36,98,0,0,1002,21,125,20,4,20,1105,1,46,104,'
               '999,1105,1,46,1101,1000,1,20,4,20,1105,1,46,98,99')
    assert day05.part2([program], test_input) == output
Exemplo n.º 3
0
 def test_part2_example1(self):
     result = day05.part2(self.example)
     self.assertEqual(result, 4)
Exemplo n.º 4
0
def test_day05_part2_puzzle():
    assert day05.part2(open('input05.txt'), 5) == 7731427
Exemplo n.º 5
0
def test_day05_part2(program, test_input, output):
    assert day05.part2([program], test_input) == output
Exemplo n.º 6
0
 def test_regressions(self):
     self.assertEqual(5182797, part1())
     self.assertEqual(12077198, part2())
def test_part2_sample(input_data):
    assert part2(input_data) == 633
Exemplo n.º 8
0
 def test_part2_input(self):
     result = day05.part2(aoc.read_input('day05.input'))
     self.assertEqual(3419022, result)
Exemplo n.º 9
0
def test_part2():
    assert part2("day05/day05.dat") == 4624
Exemplo n.º 10
0
def test_part2():
    assert part2() == 25347697
Exemplo n.º 11
0
def test_5_2_examples():
    examples = []
    for (inp, out) in examples:
        assert out == day05.part2(inp)
Exemplo n.º 12
0
def test_part2():
    assert part2(PUZZLE_INPUT) == 741