IntPairProperty¶
A property implementation for conveniently evaluating properties for pairs of integers of all Pony integer types at once.
The property needs to be formulated inside the method int_property:
class CommutativeMultiplicationProperty is IntPairProperty
fun name(): String => "commutativity/mul"
fun int_property[T: (Int & Integer[T] val)](x: T, y: T, h: PropertyHelper)? =>
h.assert_eq[T](x * y, y * x)
Implements¶
- Property1[IntPairPropertySample ref] ref
Public Functions¶
gen¶
Returns¶
- Generator[IntPairPropertySample ref] box
property¶
Parameters¶
- sample: IntPairPropertySample ref
- h: PropertyHelper val
Returns¶
- None val ?
int_property[T: (Int & Integer[T] val)]¶
Parameters¶
- x: T
- y: T
- h: PropertyHelper val
Returns¶
- None val ?
name¶
Returns¶
- String val
params¶
Returns¶
- PropertyParams val