| Safe Haskell | Safe-Infered |
|---|
Test.AC.Class.Ord
Description
Properties for testing that instances of the Ord class perform
correctly.
p_symmetric and p_transitive check the basic properties of the
ordering. In other words, they test the compare method. p_equal
checks that Ord agrees with Eq (that is, compare returns EQ
when == returns True). The Test.AC.Class.Eq module already
checks that Eq is reflexive, so if Ord agrees with Eq then
Ord too is reflexive, and we don't need a seperate test for that.
The remaining tests (i.e., p_compare, p_min and p_max) check
for the extraordinarily unlikely case that the various Ord
methods do not agree with each other. (Usually they are implemented
in terms of each other.)
- p_equal :: (Show x, Ord x) => x -> x -> Test
- p_symmetric :: (Show x, Ord x) => x -> x -> Test
- p_transitive :: (Show x, Ord x) => x -> x -> x -> Test
- p_compare :: (Show x, Ord x) => x -> x -> Test
- p_min :: (Show x, Ord x) => x -> x -> Test
- p_max :: (Show x, Ord x) => x -> x -> Test
- p_Ord :: (Show x, Ord x) => [x] -> Test