2016-05-13 02:26:52 +00:00
|
|
|
module Main exposing (..)
|
2016-03-11 11:14:24 +00:00
|
|
|
|
|
|
|
import ElmTest exposing (..)
|
|
|
|
import Leap
|
|
|
|
|
|
|
|
|
|
|
|
tests : Test
|
|
|
|
tests =
|
|
|
|
suite
|
|
|
|
"Leap"
|
|
|
|
[ test "leap year" (assertEqual True (Leap.isLeapYear 1996))
|
|
|
|
, test "non-leap year" (assertEqual False (Leap.isLeapYear 1997))
|
|
|
|
, test "non-leap even year" (assertEqual False (Leap.isLeapYear 1998))
|
|
|
|
, test "century" (assertEqual False (Leap.isLeapYear 1900))
|
|
|
|
, test "second century" (assertEqual False (Leap.isLeapYear 1800))
|
|
|
|
, test "fourth century" (assertEqual True (Leap.isLeapYear 2400))
|
|
|
|
, test "y2k" (assertEqual True (Leap.isLeapYear 2000))
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2016-05-13 02:26:52 +00:00
|
|
|
main : Program Never
|
|
|
|
main =
|
|
|
|
runSuite tests
|