advent-of-code-2023

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

day-2.lisp (554B)


      1 (defpackage #:aoc-test/day-2
      2   (:use #:cl #:lisp-unit2))
      3 (in-package #:aoc-test/day-2)
      4 
      5 (define-test test-day-2
      6     ()
      7   (multiple-value-bind (task-1 task-2)
      8       (aoc:run-day 2 "Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green
      9 Game 2: 1 blue, 2 green; 3 green, 4 blue, 1 red; 1 green, 1 blue
     10 Game 3: 8 green, 6 blue, 20 red; 5 blue, 4 red, 13 green; 5 green, 1 red
     11 Game 4: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red
     12 Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green")
     13     (assert= 8 task-1)
     14     (assert= 2286 task-2)))