1
0
Fork 0
mirror of https://github.com/correl/elm.git synced 2025-04-10 09:11:01 -09:00
This commit is contained in:
Jonathan Shih 2016-04-18 06:52:26 -07:00
parent 43aeba836a
commit 74eeb7160e

View file

@ -23,7 +23,7 @@ tests =
, suite , suite
"map" "map"
[ test "empty list" (assertEqual [] (map ((+) 1) [])) [ test "empty list" (assertEqual [] (map ((+) 1) []))
, test "non-empty list" (assertEqual [ 2, 3, 4, 5 ] (map ((+) 1) [1..4])) , test "non-empty list" (assertEqual [2..5] (map ((+) 1) [1..4]))
] ]
, suite , suite
"filter" "filter"
@ -33,7 +33,7 @@ tests =
(assertEqual [ 2, 4 ] (filter (\x -> x % 2 == 0) [1..4])) (assertEqual [ 2, 4 ] (filter (\x -> x % 2 == 0) [1..4]))
] ]
, suite , suite
"foldr" "foldl"
[ test "empty list" (assertEqual 0 (foldl (+) 0 [])) [ test "empty list" (assertEqual 0 (foldl (+) 0 []))
, test "non-empty list" (assertEqual 10 (foldl (+) 0 [1..4])) , test "non-empty list" (assertEqual 10 (foldl (+) 0 [1..4]))
] ]