advent-of-code-2024

My solutions to AoC 2024
Log | Files | Refs

all.lisp (951B)


      1 (defpackage #:aoc-test/all
      2   (:use #:cl #:lisp-unit2)
      3   (:nicknames #:aoc-test)
      4   (:import-from #:aoc-test/utils)
      5   (:export
      6    #:test-day
      7    #:test-all))
      8 (in-package #:aoc-test/all)
      9 
     10 (defun test-day (&optional (day (aoc:today)))
     11   (run-tests :package (format nil "AOC-TEST/DAY-~A" day)
     12              :run-contexts 'with-summary-context))
     13 
     14 ;; TODO: the recursive asdf/ql stuff might not be so great here
     15 (defun test-all ()
     16   (run-tests :tests (nconc
     17                      (get-tests :package '#:aoc-test/utils)
     18                      (loop for day from 1 to 25
     19                            for system-name = (format nil "aoc-test/day-~A" day)
     20                            for system = (asdf:find-system system-name nil)
     21                            when system
     22                              do (ql:quickload system-name)
     23                              and nconc (get-tests :package (string-upcase system-name))))
     24              :run-contexts 'with-summary-context))