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.Set

Description

Test.SDP.Set provides basic test quite for Set class.

Synopsis

Set test

type TestSet s o = o -> s -> s -> Bool Source #

TestSet is service type synonym for more comfortable quickCheck using.

type TestSet1 s o = o -> s o -> s o -> Bool Source #

TestSet1 is service type synonym for more comfortable quickCheck using.

setTest :: (Set s o, Linear s o, Ord s, Ord o) => o -> s -> s -> Bool Source #

setTest is complex test, that includes all other tests. Note that setTest requires any (Set s o) => s, not necessarily a set (may contain any data).

Particular tests

basicSetTest :: (Set s o, Nullable s, Eq s, Ord o) => s -> Bool Source #

basicSetTest checks relations of set, (/?\) and (\?/). Note that basicSetTest requires any (Set s o) => s, not necessarily a set (may contain any data).

insdelSetTest :: (Set s o, Eq s, Ord o) => o -> s -> Bool Source #

insdelSetTest checks rules of insert and delete. Note that insdelSetTest requires a set, not any (Set s o) => s.

lookupSetTest :: (Set s o, Linear s o, Ord o) => o -> s -> Bool Source #

lookupSetTest checks relations of lookupLT, lookupGT, lookupLE and lookupGE. Note that lookupSetTest requires a set, not any (Set s o) => s.

unintSetTest :: (Set s o, Linear s o, Ord o) => s -> s -> Bool Source #

unintSetTest checks the laws of union (\/) and intersection (/\). Note that unintSetTest requires any (Set s o) => s, not necessarily a set (may contain any data).

diffSetTest :: (Set s o, Linear s o, Ord o) => s -> s -> Bool Source #

diffSetTest checks laws of difference (\\) and symmetric difference (\^/). Note that diffSetTest requires a set, not any (Set s o) => s

elemSetTest :: (Set s o, Linear s o, Ord o) => o -> s -> Bool Source #

elemSetTest checks relations of member and isSubseqOf. Note that elemSetTest requires any (Set s o) => s, not necessarily a set (may contain any data).