advancedtelematic / quickcheck-state-machine

Test monadic programs using state machine based models
Other
203 stars 25 forks source link

fix generators #330

Closed kderme closed 5 years ago

kderme commented 5 years ago

Signed-off-by: kderme k.dermenz@gmail.com Related issue https://github.com/advancedtelematic/quickcheck-state-machine/issues/327

Note how this exception, which appears very often is most of the times hidden because of laziness:

> undefined `Prelude.elem` []
False

So the generation creates the exception many times, but the precondition hides it, since it never evaluates the undefined thunk.

kderme commented 5 years ago

Not sure what actually forced the exception in the ci, but I think this fixes the problem.

stevana commented 5 years ago

Ah yes, I thought we had fixed this, but it seems we only fixed it for the MemoryReference example (and in the readme).

The ErrorEncountered and ShrinkingProps examples seems to have the same problem, but we haven't seem them fail in the same way?

kderme commented 5 years ago

The ErrorEncountered and ShrinkingProps examples seems to have the same problem, but we haven't seem them fail in the same way?

I can also try to fix these other generators. Probably again we don't seem them fail because of laziness.