diff options
author | Yann Herklotz <git@yannherklotz.com> | 2021-12-14 01:25:55 +0000 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2021-12-14 01:25:55 +0000 |
commit | 771f9fdf08671b2673a7b19d7980f15f2288eb26 (patch) | |
tree | 720db1b52567fad8d7f262316a34a8488e748150 /test | |
parent | 1a795e9ccefdcc086d4c890ec5ed527c786e0cf1 (diff) | |
download | aoc21-771f9fdf08671b2673a7b19d7980f15f2288eb26.tar.gz aoc21-771f9fdf08671b2673a7b19d7980f15f2288eb26.zip |
Add inputs for 5
Diffstat (limited to 'test')
-rw-r--r-- | test/05.lisp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/05.lisp b/test/05.lisp new file mode 100644 index 0000000..8a717d0 --- /dev/null +++ b/test/05.lisp @@ -0,0 +1,33 @@ +(use-package :clunit) + +(defsuite 05/aoc (aoc)) + +(defvar 05/default-input + '("0,9 -> 5,9" + "8,0 -> 0,8" + "9,4 -> 3,4" + "2,2 -> 2,1" + "7,0 -> 7,4" + "6,4 -> 2,0" + "0,9 -> 2,9" + "3,4 -> 1,4" + "0,0 -> 8,8" + "5,5 -> 8,2")) + +(deftest 05/test-ex-a (05/aoc) + (let ((result (05/part-a (05/parse-input-direct 05/default-input)))) + (assert-equalp 5 result))) + +(deftest 05/test-ex-b (05/aoc) + (let ((result (05/part-b (05/parse-input-direct 05/default-input)))) + (assert-equalp 0 result))) + +(deftest 05/test-a (05/aoc) + (let ((result (05/part-a (05/parse-input "inputs/05.txt")))) + (assert-equalp 0 result))) + +(deftest 05/test-b (05/aoc) + (let ((result (05/part-b (05/parse-input "inputs/05.txt")))) + (assert-equalp 0 result))) + +(defun 05/run-tests () (run-suite '05/aoc)) |