From c0cc758e857a817dbb89d10c70d2aa2b205868b9 Mon Sep 17 00:00:00 2001 From: Peter Tillemans Date: Sun, 1 Dec 2024 11:57:25 +0100 Subject: [PATCH] solved day1 2024 --- aoc.asd | 8 ++++++-- src/main.lisp | 1 + test/2018/day06-test.lisp | 33 --------------------------------- tests/main.lisp | 10 +++------- 4 files changed, 10 insertions(+), 42 deletions(-) delete mode 100644 test/2018/day06-test.lisp diff --git a/aoc.asd b/aoc.asd index 4454f0e..10cb60d 100644 --- a/aoc.asd +++ b/aoc.asd @@ -14,11 +14,15 @@ #:lquery #:3d-vectors #:array-operations - #:lla) + #:lla + #:queues.simple-queue + #:bt-semaphore) :components ((:module "src" :components ((:file "main") - (:file "2018/day06")))) + (:file "2018/day06") + (:file "2018/day07") + ))) :description "Advent of Code challenges and solutions." :long-description "Solutions for the AOC challenges." :in-order-to ((test-op (test-op "aoc/tests")))) diff --git a/src/main.lisp b/src/main.lisp index 19a0033..52a95e9 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -1,6 +1,7 @@ (defpackage aoc (:use :cl) (:export + #:split-lines #:test-input #:clear-data-cache)) diff --git a/test/2018/day06-test.lisp b/test/2018/day06-test.lisp deleted file mode 100644 index 22ccd8b..0000000 --- a/test/2018/day06-test.lisp +++ /dev/null @@ -1,33 +0,0 @@ -(defpackage :aoc/2018/06/tests - (:use :cl :aoc :aoc/tests :parachute :aoc/2018/06) - (:export - #:suite-2018-06 - #:test-find-top-left - #:test-find-bottom-right - #:test-manhattan-distance - )) - -(in-package :aoc/2018/06/tests) - -(define-test suite-2018-06 - :parent suite-2018) - -(define-test+run test-find-top-left - :parent suite-2018-06 - (let ((result (top-left sample-points))) - (true (equalp (make-vector-2d :x 1 :y 1) result)))) - -(define-test+run test-find-bottom-right - :parent suite-2018-06 - (let ((result (bottom-right sample-points))) - (true (equalp (make-vector-2d :x 8 :y 9) result)))) - -(define-test test-manhattan-distance - :parent suite-2018-06 - (let ((p0 (make-vector-2d :x 0 :y 0)) - (p1 (make-vector-2d :x 1 :y 1)) - (p2 (make-vector-2d :x 3 :y 2))) - (true (eq 0 (manhattan-distance p0 p0))) - (true (eq 2 (manhattan-distance p0 p1))) - (true (eq 5 (manhattan-distance p0 p2))) - )) diff --git a/tests/main.lisp b/tests/main.lisp index 2324ece..7658558 100644 --- a/tests/main.lisp +++ b/tests/main.lisp @@ -1,7 +1,7 @@ (defpackage aoc/tests - (:use :cl :aoc :parachute - :aoc/2018/06/tests ) - (:export #:suite-2018)) + (:use :cl :aoc :parachute) + (:export + #:aoc-suite)) (in-package :aoc/tests) @@ -10,10 +10,6 @@ ;; top of test suite tree (define-test aoc-suite) -;; suite for every year -(define-test suite-2018 - :parent aoc-suite) - (define-test "should (= 1 1) to be true" :parent aoc-suite (true (= 1 1)))