浏览代码

Adequated tests

Marcos Dumay de Medeiros 8 年之前
父节点
当前提交
251614d10c
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      test/Test.hs

+ 2 - 2
test/Test.hs

@@ -77,14 +77,14 @@ tres5 = do
 int1 :: IO Progress
 int1 = do
   let f = (\x y -> return $ x + y) :: Int -> Int -> EitherT () IO Int
-  r <- intercalateWith resume f [1, 2, 3] (map Right [10, 20])
+  r <- intercalateFold resume f [1, 2, 3] (map Right [10, 20])
   let v = map (fromRight 0) r
   Finished <$> if v == [16, 26] then return Pass else return $ Fail $ "Wrong value: " ++ show v
 
 int5 :: IO Progress
 int5 = do
   let f = (\x y -> return $ x + y) :: Int -> Int -> EitherT () (EitherT () (EitherT () (EitherT () (EitherT () IO)))) Int
-  r <- intercalateWith resume5 f [1, 2, 3] (map (Right . Right . Right . Right . Right) [10, 20])
+  r <- intercalateFold resume5 f [1, 2, 3] (map (Right . Right . Right . Right . Right) [10, 20])
   let v = map (fromRight 0 . fromRight (Left ()) . fromRight (Left ()) . fromRight (Left ()) . fromRight (Left ())) r
   Finished <$> if v == [16, 26] then return Pass else return . Fail $ "Wrong value: " ++ show v