IntProperty¶
A property implementation for conveniently evaluating properties for all Pony Integer types at once.
The property needs to be formulated inside the method int_property
:
class DivisionByZeroProperty is IntProperty
fun name(): String => "div/0"
fun int_property[T: (Int & Integer[T] val)](x: T, h: PropertyHelper)? =>
h.assert_eq[T](T.from[U8](0), x / T.from[U8](0))
trait ref IntProperty is
Property1[IntPropertySample ref] ref
Implements¶
- Property1[IntPropertySample ref] ref
Public Functions¶
gen¶
fun box gen()
: Generator[IntPropertySample ref] box
Returns¶
- Generator[IntPropertySample ref] box
property¶
fun ref property(
sample: IntPropertySample ref,
h: PropertyHelper val)
: None val ?
Parameters¶
- sample: IntPropertySample ref
- h: PropertyHelper val
Returns¶
- None val ?
int_property[T: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Integer[T] val)]¶
fun ref int_property[T: ((I8 val | I16 val | I32 val |
I64 val | I128 val | ILong val |
ISize val | U8 val | U16 val |
U32 val | U64 val | U128 val |
ULong val | USize val) & Integer[T] val)](
x: T,
h: PropertyHelper val)
: None val ?
Parameters¶
- x: T
- h: PropertyHelper val
Returns¶
- None val ?
name¶
fun box name()
: String val
Returns¶
- String val
params¶
fun box params()
: PropertyParams val
Returns¶
- PropertyParams val