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.Set
provides basic test quite for Set
class.
Synopsis
- type TestSet s o = o -> s -> s -> Bool
- type TestSet1 s o = o -> s o -> s o -> Bool
- setTest :: (Set s o, Linear s o, Ord s, Ord o) => o -> s -> s -> Bool
- basicSetTest :: (Set s o, Nullable s, Eq s, Ord o) => s -> Bool
- insdelSetTest :: (Set s o, Eq s, Ord o) => o -> s -> Bool
- lookupSetTest :: (Set s o, Linear s o, Ord o) => o -> s -> Bool
- unintSetTest :: (Set s o, Linear s o, Ord o) => s -> s -> Bool
- diffSetTest :: (Set s o, Linear s o, Ord o) => s -> s -> Bool
- elemSetTest :: (Set s o, Linear s o, Ord o) => o -> s -> Bool
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.
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 (
, not necessarily a set
(may contain any data).Set
s o) => s
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
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 (
, not necessarily a set
(may contain any data).Set
s o) => s
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 (
, not necessarily a set
(may contain any data).Set
s o) => s