day21.lisp (545B)
1 (in-package #:adventofcode2022/test) 2 3 (define-constant +testdata-day21+ "root: pppw + sjmn 4 dbpl: 5 5 cczh: sllz + lgvd 6 zczc: 2 7 ptdq: humn - dvpt 8 dvpt: 3 9 lfqf: 4 10 humn: 5 11 ljgn: 2 12 sjmn: drzm * dbpl 13 sllz: 4 14 pppw: cczh / lfqf 15 lgvd: ljgn * ptdq 16 drzm: hmdt - zczc 17 hmdt: 32" 18 :test 'equal) 19 20 (def-test day21-task1 () 21 (is-true 22 (= 152 23 (run-task 21 1 24 (make-string-input-stream +testdata-day21+))))) 25 26 (def-test day21-task2 () 27 (is-true 28 (= 301 29 (run-task 21 2 30 (make-string-input-stream +testdata-day21+)))))