?SUCHTHAT vs ?IMPLIES in quickcheck

294 views Asked by At

In Triq, PropEr, Quickcheck in Erlang what is the difference between using a ?SUCHTHAT property and the ?IMPLIES?

From what understand they are both specializations of the values produced by generators.

1

There are 1 answers

0
aronisstav On BEST ANSWER

They are similar:

  • ?SUCHTHAT creates a generator, which additionally ensures that each generated value satisfies a constraint.
  • ?IMPLIES creates a property, which has an additional possible result, namely "skip". You can use it after all values have been generated.