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.
 
 

30 lines
833 B

module Main (main) where
import Test.Hspec
import Day1
import Day2
import Day3
main :: IO ()
main = do
hspec $ do
describe "Day1" $ do
it "solves part 1" $ do
input <- readFile "test/1"
Day1.part1 input `shouldBe` "11"
it "solves part 2" $ do
input <- readFile "test/1"
Day1.part2 input `shouldBe` "31"
describe "Day 2" $ do
it "solves part 1" $ do
input <- readFile "test/2"
Day2.part1 input `shouldBe` "2"
it "solves part 2" $ do
input <- readFile "test/2"
Day2.part2 input `shouldBe` "4"
describe "Day 3" $ do
it "solves part 1" $ do
input <- readFile "test/3.1"
Day3.part1 input `shouldBe` "161"
it "solves part 2" $ do
input <- readFile "test/3.2"
Day3.part2 input `shouldBe` "48"