import Test.Hspec
import Data.List
import Digits

digits_sum :: Integral x => x -> x
digits_sum x = foldl (+) 0 (digits_list x)

-- Tests + result print
main = hspec $ do
    describe "Dummy" $ do
        it "dummy test" $ do
            True `shouldBe` True
    describe "Euler test" $ do
        it "2^15 digits sum" $ do
            (digits_sum (2^15)) `shouldBe` 26
    describe "Euler actual problem" $ do
        it "2^1000 digits sum" $ do
            putStrLn ("res = " ++ show (digits_sum (2^1000)))
