Copyright | (c) Andrey Mulik 2019 |
---|---|
License | BSD-style |
Maintainer | work.a.mulik@gmail.com |
Portability | non-portable (requires non-portable modules) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Test.SDP.Linear
provides basic test suite for Linear
class.
Synopsis
- type TestLinear l e = Int -> e -> l -> Bool
- type TestLinear1 f e = Int -> e -> f e -> Bool
- type TestLinear2 f i e = Int -> e -> f i e -> Bool
- linearTest :: (Linear l e, Eq e, Eq l, Bordered l i) => Int -> e -> l -> Bool
- deconstructionLinearTest :: (Linear l e, Eq e) => l -> Bool
- constructionLinearTest :: (Linear l e, Eq l) => e -> l -> Bool
- basicLinearTest :: (Linear l e, Eq l) => e -> l -> Bool
- replicateTest :: (Linear l e, Eq l, Bordered l i) => Int -> e -> l -> Bool
- reverseTest :: (Linear l e, Eq e) => l -> Bool
- concatTest :: (Linear l e, Eq e, Eq l) => l -> Bool
Default Linear test
type TestLinear l e = Int -> e -> l -> Bool Source #
TestLinear
is service type synonym for more comfortable quickCheck using.
type TestLinear1 f e = Int -> e -> f e -> Bool Source #
TestLinear1
is service type synonym for more comfortable quickCheck using.
type TestLinear2 f i e = Int -> e -> f i e -> Bool Source #
TestLinear2
is service type synonym for more comfortable quickCheck using.
linearTest :: (Linear l e, Eq e, Eq l, Bordered l i) => Int -> e -> l -> Bool Source #
linearTest
is complex test, that includes all ther tests.
Particular tests
constructionLinearTest :: (Linear l e, Eq l) => e -> l -> Bool Source #
constructionLinearTest
checks relations of toHead
, toLast
and
fromList
.
basicLinearTest :: (Linear l e, Eq l) => e -> l -> Bool Source #
basicLinearTest
checks relations of isNull
, lzero
, single
and
fromList
.
replicateTest :: (Linear l e, Eq l, Bordered l i) => Int -> e -> l -> Bool Source #
replicateTest
checks rules of replicate
.
reverseTest :: (Linear l e, Eq e) => l -> Bool Source #
reverseTest
checks rules of reverse
, listL
and listR
.
concatTest :: (Linear l e, Eq e, Eq l) => l -> Bool Source #
concatTest
checks rules of (++
) and concat
.