2016-05-13 02:26:52 +00:00
|
|
|
module Main exposing (..)
|
2015-10-13 18:23:46 +00:00
|
|
|
|
2016-03-17 01:38:35 +00:00
|
|
|
import ElmTest exposing (..)
|
|
|
|
import SumOfMultiples exposing (sumOfMultiples)
|
2015-10-13 18:23:46 +00:00
|
|
|
|
2016-03-17 01:38:51 +00:00
|
|
|
|
2015-10-13 18:23:46 +00:00
|
|
|
tests : Test
|
2016-03-17 01:38:51 +00:00
|
|
|
tests =
|
2016-06-19 21:46:13 +00:00
|
|
|
suite "Sum Of Multiples"
|
|
|
|
[ test "[3, 5] 15" (assertEqual 45 (sumOfMultiples [ 3, 5 ] 15))
|
|
|
|
, test "[7, 13, 17] 20" (assertEqual 51 (sumOfMultiples [ 7, 13, 17 ] 20))
|
|
|
|
, test "[4, 6] 15" (assertEqual 30 (sumOfMultiples [ 4, 6 ] 15))
|
|
|
|
, test "[5, 6, 8] 150" (assertEqual 4419 (sumOfMultiples [ 5, 6, 8 ] 150))
|
|
|
|
, test "[43, 47] 10000" (assertEqual 2203160 (sumOfMultiples [ 43, 47 ] 10000))
|
|
|
|
, test "[5, 25] 51" (assertEqual 275 (sumOfMultiples [ 5, 25 ] 51))
|
|
|
|
]
|
2015-10-13 18:23:46 +00:00
|
|
|
|
|
|
|
|
2016-05-13 02:26:52 +00:00
|
|
|
main : Program Never
|
|
|
|
main =
|
2016-06-19 21:46:13 +00:00
|
|
|
runSuite tests
|