4 | import Evince.Expectations
8 | tryApp : App (err :: Init) a -> IO (Either err a)
9 | tryApp act = run $
handle act (\ok => pure (Right ok)) (\e => pure (Left e))
13 | mustError : App (err :: Init) a -> TestResultT IO ()
15 | result <- lift (tryApp act)
18 | Right _ => mustFail "expected error but succeeded"
22 | mustErrorWith : (Show err, DecEq err) => App (err :: Init) a -> err -> TestResultT IO ()
23 | mustErrorWith act expected = do
24 | result <- lift (tryApp act)
26 | Left e => e `mustBe` expected
27 | Right _ => mustFail "expected error but succeeded"