2024-12-08 13:33:04 +01:00
|
|
|
(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))
|
2024-12-08 13:33:04 +01:00
|
|
|
|
|
|
|
(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)))
|
2024-12-08 13:33:04 +01:00
|
|
|
|
|
|
|
(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)))
|
2024-12-08 13:33:04 +01:00
|
|
|
|
|
|
|
(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-08 13:33:04 +01:00
|
|
|
|
|
|
|
|
2024-12-19 13:08:17 +01:00
|
|
|
(defun run-tests ()
|
|
|
|
(test 'suite-2024-08))
|