Explorar o código

Adequated tests

Marcos Dumay de Medeiros %!s(int64=8) %!d(string=hai) anos
pai
achega
251614d10c
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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