Current section
Files
Jump to
Current section
Files
tests/Test/Control/Monad/Writer.phi
module Test.Control.Monad.Writer where
import Test.QuickCheck (TestGroup(..), TestResult, quickCheck1)
import Prelude (IO, discard, pure, (==))
import Control.Monad.Writer (Writer, runWriter, tell)
testTell :: Writer String Integer
testTell = do
tell "x"
tell "y"
pure 1
test :: TestGroup (Integer -> IO TestResult)
test = Exe [
quickCheck1 "tell" (runWriter testTell == (1, "xy"))
]