diff options
author | Oscar Najera <hi@oscarnajera.com> | 2022-12-13 16:35:16 +0100 |
---|---|---|
committer | Oscar Najera <hi@oscarnajera.com> | 2022-12-13 16:35:16 +0100 |
commit | 31d848750cbaa568d227595a93e24568ab9dca6a (patch) | |
tree | 5d62b5a2341bbce98ed850f8dddf8e9626293cc2 | |
parent | 8cc2675f22d1fe94f09ad847e41a99a2450c1856 (diff) | |
download | scratch-31d848750cbaa568d227595a93e24568ab9dca6a.tar.gz scratch-31d848750cbaa568d227595a93e24568ab9dca6a.tar.bz2 scratch-31d848750cbaa568d227595a93e24568ab9dca6a.zip |
explicit tests
-rw-r--r-- | AoC2022/13/solver.el | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/AoC2022/13/solver.el b/AoC2022/13/solver.el index b3b636b..3039c1e 100644 --- a/AoC2022/13/solver.el +++ b/AoC2022/13/solver.el @@ -42,16 +42,15 @@ result))))) (ert-deftest test-comparison () - (pcase-dolist (`(,f ,s ,r) - '((5 5 next) - (5 nil nil) - (nil 5 t) - (nil nil next) - ('(9) '((8 7)) nil) - ('(1 1 3 1 1) '(1 1 5 1 1) t) - ('((1) (2 3 4)) '((1) 4) t) - ('() '(5) t))) - (should (eq (solver-compare f s) r)))) + (should (eq (solver-compare 5 5) 'next)) + (should (eq (solver-compare nil nil) 'next)) + (should-not (solver-compare 5 nil)) + (should (solver-compare nil 5)) + (should (eq (solver-compare '(9) '((8 7))) nil)) + (should (solver-compare '(1 1 3 1 1) '(1 1 5 1 1))) + (should (solver-compare '((1) (2 3 4)) '((1) 4))) + (should (solver-compare '() '(5)))) + (defun solver-p1 (filename) (cl-loop |