haskell - Quickcheck specification DSL -
i want create human readable dsl non-haskell programmer understand creating specifications black-box testing of external systems.
and wonder if possible in haskell.
action = readprocess "sleep 1; print success" prop_action = monadicio $ within 100000 >>= replieswith (== "success") within :: int -> io -> io within t = frommaybe false $ timeout t replieswith :: (a -> bool) -> io -> io bool replieswith v = liftm v here i'm giving pseudo code checking action return value "success" within 0.1 seconds. seems need kind of monad short-circuit on false values chain multiple checks pass values 1 another.
feel should exist. maybe can suggest library or how implement idea in haskell.
Comments
Post a Comment