Cleanup day 1

This commit is contained in:
Jens Kadenbach
2022-12-01 16:06:38 +01:00
parent c104561d8b
commit 2f60058c6c
3 changed files with 11 additions and 14 deletions

View File

@@ -12,7 +12,7 @@ main = hspec $ do
sortElves input `shouldBe` [ elf 11000, elf 6000, elf 4000]
it "converts a list of strings to a list of either int or caloriecount" $ do
input <- readFile "ressources/day01-input-test"
elfToCalories (T.pack input) `shouldBe`
parseElfInput (T.pack input) `shouldBe`
[ elf 6000, elf 4000, elf 11000, elf 24000, elf 10000 ]
it "parser text to int" $ do
intOrZero "1000" `shouldBe` 1000