Permalink
Browse files

bugfix: test suite threw errors for certain "rigidMapM" cases

  • Loading branch information...
1 parent f16fc70 commit 7997f8e029e5e50b649125e1f31b5a66f43d4edb @JohnLato JohnLato committed Feb 4, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 testsrc/runtests.hs
View
@@ -141,8 +141,9 @@ prop_mapM f func = llmapM == (mapM func (LL.toList f))
prop_rigidMapM :: forall full item. (TestLL full item, TestLL [item] item) => full -> (item -> Maybe item) -> Property
prop_rigidMapM f func =
case (LL.rigidMapM func f, mapM func (LL.toList f)) of
- (Just ll, Just l) -> llcmp ll l
- _ -> error "error in prop_rigidMapM"
+ (Just ll, Just l) -> llcmp ll l
+ (Nothing, Nothing) -> property True
+ e -> error $ "error in prop_rigidMapM: " ++ show e
-- FIXME: can we test mapM_?

0 comments on commit 7997f8e

Please sign in to comment.