Use noDupsList generator for more tests
This commit is contained in:
parent
36999532c2
commit
2a9459f226
|
@ -182,15 +182,17 @@ unique xs = length xs == (length . nub) xs
|
||||||
|
|
||||||
prop_valid_empty = valid []
|
prop_valid_empty = valid []
|
||||||
|
|
||||||
prop_valid_dupNoT ss = unique ss ==> valid (ss `zip` repeat NoT)
|
prop_valid_dupNoT =
|
||||||
|
forAll noDupsList $ \ss ->
|
||||||
|
valid (ss `zip` repeat NoT)
|
||||||
|
|
||||||
prop_valid_dupT ss ts =
|
prop_valid_dupT =
|
||||||
unique ss
|
forAll noDupsList $ \ss ->
|
||||||
&& unique ts
|
forAll noDupsList $ \ts' ->
|
||||||
&& length ss > length ts
|
let ts = filter (/= NoT) ts'
|
||||||
&& not (null ts)
|
in length ss > length ts && not (null ts)
|
||||||
&& NoT `notElem` ts
|
==> not . valid
|
||||||
==> not . valid $ ss `zip` cycle ts
|
$ ss `zip` cycle ts
|
||||||
|
|
||||||
prop_valid_noDups =
|
prop_valid_noDups =
|
||||||
forAll noDupsList $ \ss ->
|
forAll noDupsList $ \ss ->
|
||||||
|
|
Loading…
Reference in New Issue
Block a user