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.

20 lines
520 B

3 weeks ago
  1. module Main (main) where
  2. import Test.Hspec
  3. import Day1
  4. import Day2
  5. main :: IO ()
  6. main = do
  7. day1in <- readFile "test/1.testcase"
  8. day2in <- readFile "test/2.testcase"
  9. hspec $ do
  10. describe "Day1" $ do
  11. it "solves part 1" $ do
  12. Day1.part1 day1in `shouldBe` "11"
  13. it "solves part 2" $ do
  14. Day1.part2 day1in `shouldBe` "31"
  15. describe "Day 2" $ do
  16. it "solves part 1" $ do
  17. Day2.part1 day2in `shouldBe` "2"
  18. it "solves part 2" $ do
  19. Day2.part2 day2in `shouldBe` "4"