import Test.Hspec
import Data.List
import Digits

factorial :: Integer -> Integer
factorial 1 = 1
factorial n = n * factorial(n-1)

process n = sum (digits_list (factorial n))

-- Tests + result print
main = hspec $ do
    describe "Dummy" $ do
        it "dummy test" $ do
            True `shouldBe` True
    describe "Euler test" $ do
        it "Test digits sum for 10!" $ do
           (process 10) `shouldBe` 27
    describe "Euler actual problem" $ do
        it "Test digits sum for 100!" $ do
            putStrLn ("res = " ++ show (process 100))
