advent-of-code-2023

My solutions to AoC 2023
git clone git://git.entf.net/advent-of-code-2023
Log | Files | Refs

day-20.lisp (425B)


      1 (defpackage #:aoc-test/day-20
      2   (:use #:cl #:lisp-unit2))
      3 (in-package #:aoc-test/day-20)
      4 
      5 (define-test test-day-20
      6     ()
      7   (multiple-value-bind (task-1)
      8       (aoc:run-day 20 "broadcaster -> a, b, c
      9 %a -> b
     10 %b -> c
     11 %c -> inv
     12 &inv -> a")
     13     (assert= 32000000 task-1))
     14   (multiple-value-bind (task-1)
     15       (aoc:run-day 20 "broadcaster -> a
     16 %a -> inv, con
     17 &inv -> b
     18 %b -> con
     19 &con -> output")
     20     (assert= 11687500 task-1)))