Skip to content

New QuickCheck breaks prop_req_out_of_range #30

@nick8325

Description

@nick8325

In the latest QuickCheck, prop_req_out_of_range will only be tested 1 time, not 100. This is because QuickCheck now assumes that any property without a forAll (or similar) is deterministic.

The easiest way to fix it is to use a normal quantifier instead of MkProperty. Something like the following (untested) should keep the types as you need them:

prop_req_out_of_range :: forall a . (Arbitrary (Value a), EncodeWire a) => Proxy a -> Property
prop_req_out_of_range _ = property $ \(Blind (val :: Value a)) ->
  prop_req_reify_out_of_range (Just val) prop_encode_fail

Alternatively, you can wrap the property in again to tell QuickCheck that it's nondeterministic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions