on master help sign in
Add Array.to/fromJSArray tests
commit155c60e4dc059144c536aca4b62b80db5c91f8c8 authorChristian Widera <xash@posteo.de> dateWed 30 Apr 2014, 17:41 (13 years ago) parent2cbb9b4
1 file changed+3−1
tests/elm/Test/Array.elm+3−1
tests/elm/Test/Array.elm+3−1
@@ -2,6 +2,7 @@ module Test.Array (tests) where
22
33import List
44import Array
5+import Native.Array
56
67import ElmTest.Assertion (..)
78import ElmTest.Test (..)
@@ -44,4 +45,5 @@ tests =
4445 , test "foldr" <| assertEqual (Array.foldr (+) 0 (Array.repeat 3 5)) 15
4546 , test "foldl 2" <| assertEqual (Array.foldr (::) [] (Array.fromList [1,2,3])) [3,2,1]
4647 ]
47− in List.concat [creationTests, basicsTests, getAndSetTests, takingArraysApartTests, mappingAndFoldingTests]
48+ nativeTests = [ test "jsArrays" <| assertEqual (Array.repeat 1050) (Array.fromJSArray (Array.toJSArray (Array.repeat 1050) ]
49+ in List.concat [creationTests, basicsTests, getAndSetTests, takingArraysApartTests, mappingAndFoldingTests, nativeTests]