You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you write with cover: "I want that x% (e.g. 100%) of my generated characters are a", and no as are generated at all, cover doesn't warn you when it should.
--| A stable version of QuickCheck's `cover`. In its current implementation,-- cover will not detect insufficient coverage if the actual coverage in the-- sample is 0. Work around this by lifting the probability to at least-- 10 percent.-- The underlying issue is tracked at-- https://github.com/nick8325/quickcheck/issues/26stableCover::Testableprop=>Bool->Int->String->prop->Property
stableCover pred percent label prop =let newlabel ="(stabilized to at least 10%) "++ label
in forAll (frequency [(1, returnTrue), (9, returnFalse)]) $\ basechance ->
cover (basechance ||pred) (10+ (percent *9`div`10)) newlabel prop
If you write with
cover
: "I want that x% (e.g. 100%) of my generated characters area
", and noa
s are generated at all,cover
doesn't warn you when it should.Example 1:
The problem is that quickcheck only considers
stamp
s that actually occur.This also happens if the percentage is very small so that with high probability no suitable sample is found; example 2:
The location where
cover
is handled iscovers
insuccess :: State -> IO ()
inQuickCheck.Test
.The text was updated successfully, but these errors were encountered: