-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Is shrinking different? What is the difference?
Maybe this is also a bug report on shrinking behavior.
We are sometimes generating actions in DL like this:
-- seed world
forAllQ (withGenQ genSeed (const [])) >>= action_
-- init head
WorldState{hydraParties} <- getModelStateDL
forAllQ (withGenQ (genInit hydraParties) (const [])) >>= action_
which when failing, shrinks in a way it invalidates a pre-condition, e.g.
Falsified (after 1 test and 1 shrink):
do _ <- forAllQ $ exactlyQ $ Init (Party {vkey = HydraVerificationKey (VerKeyEd25519DSIGN "55517edd313790d7ac8140e12c783847fad49f9f7b242d385423db7b9ff2443d")})
-- In state: [] |- WorldState {hydraParties = [], hydraState = Start}
action $ Init (Party {vkey = HydraVerificationKey (VerKeyEd25519DSIGN "55517edd313790d7ac8140e12c783847fad49f9f7b242d385423db7b9ff2443d")}) -- Failed precondition
pure ()
(If I run this with max shrinks 0 it shows the actually failing model / perform).
However, when exchanging the first forAllQ with forAllNonVariableQ this does not fail on precondition when shrinking (supposedly, given the test output saying "1 test and 1 shrink").
uhbif19
Metadata
Metadata
Assignees
Labels
No labels