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

Ben Franksen bugs at darcs.net
Sun Feb 16 21:58:33 UTC 2020


Ben Franksen <ben.franksen at online.de> added the comment:

After looking a bit closer at what this does e.g. in
Arbitrary.RepoPatch, I think this doesn't yet take advantage of the new
shrinker for many of the tests. For instance,

withSingle
  :: Merge p
  => (forall wX wY. p wX wY -> r)
  -> Sealed2 (WithStartState2 (MergeableSequence p)) -> Maybe r
withSingle prop (Sealed2 (WithStartState2 _ ms))
  = case mergeableSequenceToRL ms of
      _ :<: pp -> Just (prop pp)
      _ -> Nothing

I may be wrong but I see the property gets applied to a plain patch w/o
any state. So if that test fails, QC calls the shrink method for the
plain @p@, not for any @WithStartState2 p at .

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1986>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pEpkey.asc
Type: application/pgp-keys
Size: 4211 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20200216/85d1d821/attachment.key>


More information about the darcs-devel mailing list