mirror of
https://github.com/correl/elm.git
synced 2024-11-15 19:19:31 +00:00
Clarify the space-age test requirements
This commit is contained in:
parent
90e7d88374
commit
c4e8aea66a
2 changed files with 35 additions and 9 deletions
|
@ -1 +1,11 @@
|
|||
module SpaceAge (..) where
|
||||
|
||||
type Planet
|
||||
= Mercury
|
||||
| Venus
|
||||
| Earth
|
||||
| Mars
|
||||
| Jupiter
|
||||
| Saturn
|
||||
| Uranus
|
||||
| Neptune
|
||||
|
|
|
@ -9,15 +9,31 @@ import SpaceAge exposing (Planet(..), ageOn)
|
|||
tests : Test
|
||||
tests =
|
||||
suite
|
||||
"SpaceAge Test Suite"
|
||||
[ test "age in earth years" (assertEqual 32 (round (ageOn Earth 1000000000)))
|
||||
, test "age in mercury years" (assertEqual 281 (round (ageOn Mercury 2134835688)))
|
||||
, test "age in venus years" (assertEqual 10 (round (ageOn Venus 189839836)))
|
||||
, test "age on mars" (assertEqual 39 (round (ageOn Mars 2329871239)))
|
||||
, test "age on jupiter" (assertEqual 2 (round (ageOn Jupiter 901876382)))
|
||||
, test "age on saturn" (assertEqual 3 (round (ageOn Saturn 3000000000)))
|
||||
, test "age on uranus" (assertEqual 1 (round (ageOn Uranus 3210123456)))
|
||||
, test "age on neptune" (assertEqual 2 (round (ageOn Neptune 8210123456)))
|
||||
"SpaceAge"
|
||||
[ test
|
||||
"age in earth years"
|
||||
(assertEqual 32 (round (ageOn Earth 1000000000)))
|
||||
, test
|
||||
"age in mercury years"
|
||||
(assertEqual 281 (round (ageOn Mercury 2134835688)))
|
||||
, test
|
||||
"age in venus years"
|
||||
(assertEqual 10 (round (ageOn Venus 189839836)))
|
||||
, test
|
||||
"age on mars"
|
||||
(assertEqual 39 (round (ageOn Mars 2329871239)))
|
||||
, test
|
||||
"age on jupiter"
|
||||
(assertEqual 2 (round (ageOn Jupiter 901876382)))
|
||||
, test
|
||||
"age on saturn"
|
||||
(assertEqual 3 (round (ageOn Saturn 3000000000)))
|
||||
, test
|
||||
"age on uranus"
|
||||
(assertEqual 1 (round (ageOn Uranus 3210123456)))
|
||||
, test
|
||||
"age on neptune"
|
||||
(assertEqual 2 (round (ageOn Neptune 8210123456)))
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue