2017-05-27 17:56:31 +00:00
|
|
|
module Tests exposing (..)
|
2016-03-11 11:14:24 +00:00
|
|
|
|
2016-08-17 11:14:17 +00:00
|
|
|
import Test exposing (..)
|
|
|
|
import Expect
|
2016-03-11 11:14:24 +00:00
|
|
|
import Leap
|
|
|
|
|
|
|
|
|
|
|
|
tests : Test
|
|
|
|
tests =
|
2016-08-17 11:14:17 +00:00
|
|
|
describe "Leap"
|
|
|
|
[ test "leap year" <|
|
|
|
|
\() -> Expect.equal True (Leap.isLeapYear 1996)
|
2017-07-05 20:35:15 +00:00
|
|
|
, skip <|
|
|
|
|
test "non-leap year" <|
|
|
|
|
\() -> Expect.equal False (Leap.isLeapYear 1997)
|
|
|
|
, skip <|
|
|
|
|
test "non-leap even year" <|
|
|
|
|
\() -> Expect.equal False (Leap.isLeapYear 1998)
|
|
|
|
, skip <|
|
|
|
|
test "century" <|
|
|
|
|
\() -> Expect.equal False (Leap.isLeapYear 1900)
|
|
|
|
, skip <|
|
|
|
|
test "second century" <|
|
|
|
|
\() -> Expect.equal False (Leap.isLeapYear 1800)
|
|
|
|
, skip <|
|
|
|
|
test "fourth century" <|
|
|
|
|
\() -> Expect.equal True (Leap.isLeapYear 2400)
|
|
|
|
, skip <|
|
|
|
|
test "y2k" <|
|
|
|
|
\() -> Expect.equal True (Leap.isLeapYear 2000)
|
2016-06-19 21:46:13 +00:00
|
|
|
]
|