Andriy Drozdyuk
Andriy Drozdyuk

Reputation: 61041

?SUCHTHAT vs ?IMPLIES in quickcheck

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.

Upvotes: 1

Views: 307

Answers (1)

aronisstav
aronisstav

Reputation: 7914

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.

Upvotes: 3

Related Questions