| Safe Haskell | Safe-Infered |
|---|
Test.AC.Class.Eq
Description
Properties for testing that instances of the Eq class perform
correctly.
p_reflexive, p_symmetric and p_transitive check the basic
properties of an equity relation. In other words, they test the
== method. p_not_equal checks for the extraordinarily unlikely
case of == and /= not agreeing on equity. (The default
implementation of /= automatically guarantees that this test
will pass, and that's what most people presumably use.)
- p_reflexive :: (Show x, Eq x) => x -> Test
- p_symmetric :: (Show x, Eq x) => x -> x -> Test
- p_transitive :: (Show x, Eq x) => x -> x -> x -> Test
- p_not_equal :: (Show x, Eq x) => x -> x -> Test
- p_Eq :: (Show x, Eq x) => [x] -> Test
Documentation
p_reflexive :: (Show x, Eq x) => x -> TestSource
Check that x == x.
p_symmetric :: (Show x, Eq x) => x -> x -> TestSource
Check that if x == y then y == x as well.
p_transitive :: (Show x, Eq x) => x -> x -> x -> TestSource
Check that if x == y and y == z then x == z.
p_not_equal :: (Show x, Eq x) => x -> x -> TestSource
Check that x /= y is the same as not (x == y).