on master help sign in
Added test cases for "last" operation
commit8e4a60c472d7914b55f62b7d3e37e85a7c17887a authorHarendra Kumar <harendra.kumar@gmail.com> dateSun 11 Mar 2018, 02:13 (9 years ago) parent84dc45c
1 file changed+3
test/Main.hs+3
test/Main.hs+3
@@ -661,6 +661,9 @@ streamOperations (stream, list, len) = do
661661
662662 -- Elimination
663663 it "foldl" $ elimination (A.foldl (+) 0 id) (foldl (+) 0)
664+ if list == []
665+ then it "last empty" $ A.last stream `shouldReturn` Nothing
666+ else it "last nonEmpty" $ A.last stream `shouldReturn` Just (last list)
664667
665668 where
666669