on master help sign in
Added test cases for "last" operation
8e4a60cHarendra Kumar
test/Main.hs+3
@@ -661,6 +661,9 @@ streamOperations (stream, list, len) = do
661
661
662 -- Elimination
662 -- Elimination
663 it "foldl" $ elimination (A.foldl (+) 0 id) (foldl (+) 0)
663 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)
664
667
665 where
668 where
666
669