You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
613 B
17 lines
613 B
module Main (main) where
|
|
import Test.Hspec
|
|
import Day1
|
|
import Day2
|
|
|
|
main :: IO ()
|
|
main = hspec $ do
|
|
describe "Day1" $ do
|
|
it "solves part 1" $ do
|
|
Day1.part1 "3 4\n4 3\n2 5\n1 3\n3 9\n3 3\n" `shouldBe` "11"
|
|
it "solves part 2" $ do
|
|
Day1.part2 "3 4\n4 3\n2 5\n1 3\n3 9\n3 3\n" `shouldBe` "31"
|
|
describe "Day 2" $ do
|
|
it "solves part 1" $ do
|
|
Day2.part1 "7 6 4 2 1\n1 2 7 8 9\n9 7 6 2 1\n1 3 2 4 5\n8 6 4 4 1\n1 3 6 7 9" `shouldBe` "2"
|
|
it "solves part 2" $ do
|
|
Day2.part2 "7 6 4 2 1\n1 2 7 8 9\n9 7 6 2 1\n1 3 2 4 5\n8 6 4 4 1\n1 3 6 7 9" `shouldBe` "4"
|