def test_1(): testinput = ( "5 9 2 8\n", "9 4 7 3\n", "3 8 6 5\n", ) assert solution2.solve(testinput) == 9
def test_solve(): testdata = ( "b inc 5 if a > 1\n", "a inc 1 if b < 5\n", "c dec -10 if a >= 1\n", "c inc -20 if c == 10\n", ) assert solution2.solve(testdata) == 10
def test_solve(): data = [ 0, 3, 0, 1, -3, ] assert solution2.solve(data) == 10
def test_solve(): data = ( "abcde fghij\n", "abcde xyz ecdab\n", "a ab abc abd abf abj\n", "iiii oiii ooii oooi oooo\n", "oiii ioii iioi iiio\n", ) assert solution2.solve(data) == 3
def test_solve(): testdata = ( "pbga (66)\n", "xhth (57)\n", "ebii (61)\n", "havc (66)\n", "ktlj (57)\n", "fwft (72) -> ktlj, cntj, xhth\n", "qoyq (66)\n", "padx (45) -> pbga, havc, qoyq\n", "tknk (41) -> ugml, padx, fwft\n", "jptl (61)\n", "ugml (68) -> gyxo, ebii, jptl\n", "gyxo (61)\n", "cntj (57)\n",) assert solution2.solve(testdata) == 60
def test_3(): testdata = "<<<<>" assert solution2.solve(testdata) == 3
def test_2(): testdata = "<random characters>" assert solution2.solve(testdata) == 17
def test_1(): testdata = "<>" assert solution2.solve(testdata) == 0
def test_4(): input_line = "1,2,4" thelist = list(range(256)) assert solution2.solve(thelist, input_line) == "63960835bcdc130f0b66d7ff4f6a5a8e"
def test_2(): input_line = "AoC 2017" thelist = list(range(256)) assert solution2.solve(thelist, input_line) == "33efeb34ea91902bb2f59c9920caa6cd"
def test_9(): testdata = '{{},{}, <123>, <12!3!>4>}' assert solution2.solve(testdata) == 6
def test_7(): testdata = '<{o"i!a,<{i<a>' assert solution2.solve(testdata) == 10
def test_1(): assert solution2.solve("1212") == 6
def test_5(): assert solution2.solve("12131415") == 4
def test_4(): assert solution2.solve("123123") == 12
def test_3(): assert solution2.solve("123425") == 4
def test_1(): assert solution2.solve(65, 8921) == 309
def test_4(): testdata = "<{!>}>" assert solution2.solve(testdata) == 2
def test_6(): testdata = "<!!!>>" assert solution2.solve(testdata) == 0
def test_2(): assert solution2.solve("1221") == 0
def test_8(): testdata = '{{{{{{{<>},<<!>},<,>},{{<oou<o{!>,<i!!!!!>!!ouu}i>}}}}}}' assert solution2.solve(testdata) == 19
def test_solve(): data = [0, 2, 7, 0] assert solution2.solve(data) == 4
def test_1(): assert solution2.solve(testdata) == 10
def test_1(): input_line = "" thelist = list(range(256)) assert solution2.solve(thelist, input_line) == "a2582a3a0e66e6e86e3812dcb672a272"
def test_1(): assert solution2.solve('flqrgnkx') == 1242
def test_3(): input_line = "1,2,3" thelist = list(range(256)) assert solution2.solve(thelist, input_line) == "3efbe78a8d82f29979031a4aa0b16a9d"