0 | module Test.Async.Spec.TestEnv
2 | import Data.Linear.Ref1
4 | import Text.PrettyPrint.Bernardy
13 | failures : IORef Nat
23 | mkEnv : Lift1 World f => Bool -> f TestEnv
28 | pure $
TE d f t b LL80
30 | parameters {auto te : TestEnv}
31 | {auto has : HasIO io}
35 | addFailure = runIO $
casmod1 te.failures S
39 | addTest = runIO $
casmod1 te.tests S
43 | incDepth = runIO $
casmod1 te.depth S
47 | decDepth = runIO $
casmod1 te.depth pred
50 | renderDoc : (te : TestEnv) => Doc te.layout -> String
51 | renderDoc = render te.layout . indent 2