hsExprTest-3.6.5: Expression Testing
Safe HaskellUnsafe
LanguageHaskell2010

Test.Expr

Description

Simple utility functions for testing.

(c) 2014-2021 Vladimír Štill

Synopsis

Test Entry

testMain :: TestConfig -> Q [Dec] #

testType :: TypeOrder -> ExprName -> Q Exp #

testType' :: (Type -> Type) -> TypeOrder -> ExprName -> Q Exp #

extractOptionDef :: String -> Exp -> Q Exp #

extractOptionMaybe :: String -> Q Exp #

extractOption :: String -> Q Exp #

Test Expression Building Blocks

(<==>) :: (Eq a, Show a, NFData a) => a -> a -> Property infix 4 #

Exception aware comparison. If no exception is thrown when evaluating either of the values, compares them using (==), if exception is thrown in both, exception type is compared, otherwise if exception is thrown only in one, property fails. Mismatching values are returned using counterexample on failure.

cmpTeacherStudent :: (Eq a, Show a, NFData a) => a -> a -> Property infix 4 #

runProperty :: Testable prp => Args -> prp -> IO () #

runProperties :: Testable prp => Args -> [prp] -> IO () #

data Args #

Constructors

Args 

Fields

Instances

Instances details
Read Args 
Instance details

Defined in Test.QuickCheck.Test

Methods

readsPrec :: Int -> ReadS Args

readList :: ReadS [Args]

readPrec :: ReadPrec Args

readListPrec :: ReadPrec [Args]

Show Args 
Instance details

Defined in Test.QuickCheck.Test

Methods

showsPrec :: Int -> Args -> ShowS

show :: Args -> String

showList :: [Args] -> ShowS

scheduleAlarm :: Int -> IO Int #

type TestAs α β = α #

Intended to be used with the teacher's solution: foo :: a `TestAs` Positive a -> b `TestAs` Large b -> Bool