Update tests
This commit is contained in:
@@ -17,9 +17,11 @@ import Test.Hspec.Hedgehog (forAll, forAllWith, hedgehog, (===))
|
||||
-- sides on generated inputs.
|
||||
|
||||
runPure :: Mealy Identity a b -> [a] -> [b]
|
||||
runPure _ [] = []
|
||||
runPure m (a : as) = case runIdentity (runMealy m id fakeRequest a) of
|
||||
Pair b m' -> b : runPure m' as
|
||||
runPure m = go (runMealy m id)
|
||||
where
|
||||
go _ [] = []
|
||||
go w (a : as) = case runIdentity (stepAuto w fakeRequest a) of
|
||||
(b, w') -> b : go w' as
|
||||
|
||||
-- | Machines wrap functions and have no Show; name them for forAll instead.
|
||||
forAllMealy :: Gen (Mealy Identity a b) -> PropertyT IO (Mealy Identity a b)
|
||||
|
||||
Reference in New Issue
Block a user