aoc-cl/tests/2024/day08-test.lisp

30 lines
652 B
Common Lisp
Raw Normal View History

(defpackage :aoc/2024/08/tests
2024-12-19 13:08:17 +01:00
(:use :cl :aoc :aoc/tests :aoc/2024/tests :parachute :aoc/2024/08)
(:export :run-tests))
(in-package :aoc/2024/08/tests)
(define-test suite-2024-08
;:parent suite-2024
)
(define-test+run test-part1
:parent suite-2024-08
2024-12-19 13:08:17 +01:00
(is equal "14" (part1 sample-data)))
(define-test+run test-part2
:parent suite-2024-08
2024-12-19 13:08:17 +01:00
(is equalp "34" (part2 sample-data))
(is equalp "9" (part2 sample-data2)))
(define-test test-parse-line
:parent suite-2024-08
2024-12-19 13:08:17 +01:00
(is equalp '() (parse-line (first sample-text)))
(is equalp '((8 #\0)) (parse-line (second sample-text))))
2024-12-19 13:08:17 +01:00
(defun run-tests ()
(test 'suite-2024-08))