Combine two claims, requiring both to be true.
Combine two claims, requiring both to be true.
This is equivalent to & and && for Boolean. It is not named && because it does not short-circuit evaluation -- the right-hand side will be evaluated even if the left-hand side is false.
Combine two claims, requiring exactly one to be true.
Combine two claims, requiring exactly one to be true.
This is eqvuialent to ^ for Boolean. It is an exclusive-or, which means that it is false if both claims are false or both claims are true, and true otherwise.
Label explaining a claim's expression.
Label explaining a claim's expression.
This label will be used with ScalaCheck to explain failing properties. Crucially, it will be called recursively, so it should not add information that is only relevant at the top-level.
The convention is _not_ to parenthesize a top-level expression in a label, but only sub-expressions.
Build a ScalaCheck Prop value from a claim.
Build a ScalaCheck Prop value from a claim.
This Prop uses two values from the claim: the res
and the
label
. Currently it only attaches a label to failed Prop
values, although this could change in the future.
Display a status string for a claim.
Display a status string for a claim.
This method is used to annotate sub-claims in a larger claim.
Negate this claim, requiring it to be false.
Combine two claims, requiring at least one to be true.
Combine two claims, requiring at least one to be true.
This is equivalent to | and || for Boolean. It is not named || because it does not short-circuit evaluation -- the right-hand side will be evaluated even if the left-hand side is true.
Claim represents a Boolean result with a description of what that result means.
Claims can be composed using the same operators as Booleans, which correspond to recursive Claim subtypes (e.g. And, Or, etc.).
All claims can be converted into ScalaCheck Prop values. (The reverse is not true -- it's not possible to extra ScalaCheck labels from a Prop without running it.)