sdp-quickcheck-0.2: SDP QuickCheck support
Copyright(c) Andrey Mulik 2019
LicenseBSD-style
Maintainerwork.a.mulik@gmail.com
Portabilitynon-portable (requires non-portable modules)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.SDP.Linear

Description

Test.SDP.Linear provides basic test suite for Linear class.

Synopsis

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.