aboutsummaryrefslogtreecommitdiffstats
path: root/AoC2022/aocclj/test
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2023-02-05 19:09:06 +0100
committerOscar Najera <hi@oscarnajera.com>2023-02-05 19:09:06 +0100
commit4daf41bd69e01f137be90881ec419b3c045a2ec5 (patch)
treecc69c4dcc980c304e8e12ce11485533c0011f1f5 /AoC2022/aocclj/test
parent84ec86b63ac38423ce021448e379b87094f7d4ac (diff)
downloadscratch-4daf41bd69e01f137be90881ec419b3c045a2ec5.tar.gz
scratch-4daf41bd69e01f137be90881ec419b3c045a2ec5.tar.bz2
scratch-4daf41bd69e01f137be90881ec419b3c045a2ec5.zip
Try clojure for day 1 and test transducers
Diffstat (limited to 'AoC2022/aocclj/test')
-rw-r--r--AoC2022/aocclj/test/aocclj/core_test.clj7
-rw-r--r--AoC2022/aocclj/test/aocclj/day01_test.clj10
2 files changed, 17 insertions, 0 deletions
diff --git a/AoC2022/aocclj/test/aocclj/core_test.clj b/AoC2022/aocclj/test/aocclj/core_test.clj
new file mode 100644
index 0000000..15216e7
--- /dev/null
+++ b/AoC2022/aocclj/test/aocclj/core_test.clj
@@ -0,0 +1,7 @@
+(ns aocclj.core-test
+ (:require [clojure.test :refer :all]
+ [aocclj.core :refer :all]))
+
+(deftest a-test
+ (testing "FIXME, I fail."
+ (is (= 1 1))))
diff --git a/AoC2022/aocclj/test/aocclj/day01_test.clj b/AoC2022/aocclj/test/aocclj/day01_test.clj
new file mode 100644
index 0000000..ca1262c
--- /dev/null
+++ b/AoC2022/aocclj/test/aocclj/day01_test.clj
@@ -0,0 +1,10 @@
+(ns aocclj.day01-test
+ (:require [aocclj.day01 :as sut]
+ [clojure.test :as t]
+ [clojure.string :as str]))
+
+(t/deftest solutions
+ (let [input (str/split-lines (slurp "../01/input"))]
+ (t/are [expected function] (= expected (function input))
+ 75622 sut/part1
+ 213159 sut/part2)))