module Test.Data.Result where import Test.QuickCheck (TestGroup(..), TestResult, quickCheck) import Prelude import Data.Result (Result(..)) o1 :: Result Integer Integer o1 = Ok 1 e1 :: Result Integer Integer e1 = Error 1 test :: TestGroup (Integer -> IO TestResult) test = Exe [ quickCheck "showOk" (show o1 == "Ok 1") , quickCheck "showError" (show e1 == "Error 1") , quickCheck "eq1" (o1 == o1) , quickCheck "eq2" (o1 /= e1) , quickCheck "ord" (o1 > e1) ]