Update tests

This commit is contained in:
2026-09-12 20:18:13 +03:00
parent b20320c779
commit a3dd63f26c
4 changed files with 38 additions and 54 deletions
+5 -3
View File
@@ -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)