Current section
Files
Jump to
Current section
Files
tests/Test/Data/Bool.phi
module Test.Data.Bool where
import Test.QuickCheck (TestGroup(..), TestResult, quickCheck)
import Prelude (IO, and, not, or, ($), (==))
propAnd :: Boolean -> Boolean -> Boolean
propAnd b1 b2 = and b1 b2 == and b2 b1
propOr :: Boolean -> Boolean -> Boolean
propOr b1 b2 = or b1 b2 == or b2 b1
propNot :: Boolean -> Boolean
propNot b1 = b1 == (not $ not b1)
test :: TestGroup (Integer -> IO TestResult)
test = Exe [ quickCheck "and" propAnd
, quickCheck "or" propOr
, quickCheck "not" propNot
]