[darcs-devel] [patch1986] tests: replace withSingle with withState... (and 1 more)

Ganesh Sittampalam bugs at darcs.net
Sat Feb 15 11:09:35 UTC 2020


Ganesh Sittampalam <ganesh at earth.li> added the comment:

I _think_ this variant should preserve the existing coverage.
The bSized that was on arbitrarySizedSequence was already replicated
in instance ArbitraryState MergeableSequence.

But without coverage tests it's hard to be sure. Maybe we could use
checkCoverage from QuickCheck to be sure of that.

This also replaces the existing shrinking for Fork and WithStartModel.
I'm not sure the WithState2-based shrinking is a perfect replacement,
but I think it's better overall. Also reducing the different ways
we handle shrinking will make it easier to make general improvements.

2 patches for repository darcs-unstable at darcs.net:screened:

patch b7b03658ee2260354916d101b169e6fd84998c56
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Fri Feb 14 06:51:31 GMT 2020
  * specialise the types of withSingle etc
  
  The new types reflect their actual usage and will make it
  easier to move logic around.

patch 2f1631f5733447e28a0c529ecd47523d4edafff7
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Sat Feb 15 09:29:21 GMT 2020
  * use the shrinking for MergeableSequence on existing tests

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1986>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 15453 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20200215/2f94fb58/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: specialise-the-types-of-withsingle-etc.dpatch
Type: application/x-darcs-patch
Size: 31661 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20200215/2f94fb58/attachment-0003.bin>
-------------- next part --------------
.





More information about the darcs-devel mailing list