Skip to content

IntPairProperty

[Source]

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)
trait ref IntPairProperty is
  Property1[IntPairPropertySample ref] ref

Implements


Public Functions

gen

[Source]

fun box gen()
: Generator[IntPairPropertySample ref] box

Returns


property

[Source]

fun ref property(
  sample: IntPairPropertySample ref,
  h: PropertyHelper val)
: None val ?

Parameters

Returns


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)]

[Source]

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,
  y: T,
  h: PropertyHelper val)
: None val ?

Parameters

Returns


name

[Source]

fun box name()
: String val

Returns


params

[Source]

fun box params()
: PropertyParams val

Returns