Skip to content

StatefulPropertyRunner[S: S, M: M, Cmd: Stringable val]

[Source]

Executes a StatefulProperty using recursive behaviours with interleaved step execution.

Each sample: draw step count, create fresh state via factory methods, execute steps with interleaved draws from Randomness, check invariants, run final_check. On failure, the choice sequence is handed to _Shrinker unchanged for replay-based shrinking.

actor tag StatefulPropertyRunner[S: S, M: M, Cmd: Stringable val] is
  _IPropertyRunner tag

Implements

  • _IPropertyRunner tag

Constructors

create

[Source]

new tag create(
  prop: StatefulProperty[S, M, Cmd] iso,
  params: PropertyParams val,
  notify: PropertyResultNotify val,
  logger: PropertyLogger val,
  env: Env val)
: StatefulPropertyRunner[S, M, Cmd] tag^

Parameters

Returns


Public Behaviours

run

[Source]

Execute the property test.

be run()

complete_run

[Source]

be complete_run(
  round: _Round,
  success: Bool val)

Parameters

  • round: _Round
  • success: Bool val

do_shrink

[Source]

Begin shrinking the failing choice sequence.

be do_shrink(
  failed_repr: String val)

Parameters


expect_action

[Source]

be expect_action(
  name: String val,
  round: _Round)

Parameters

  • name: String val
  • round: _Round

complete_action

[Source]

be complete_action(
  name: String val,
  round: _Round,
  ph: PropertyHelper val)

Parameters


fail_action

[Source]

be fail_action(
  name: String val,
  round: _Round,
  ph: PropertyHelper val)

Parameters


classify

[Source]

be classify(
  label: String val,
  round: _Round)

Parameters

  • label: String val
  • round: _Round

tabulate

[Source]

be tabulate(
  heading: String val,
  label: String val,
  round: _Round)

Parameters


cover

[Source]

be cover(
  condition: Bool val,
  label: String val,
  min_pct: F64 val,
  round: _Round)

Parameters

  • condition: Bool val
  • label: String val
  • min_pct: F64 val
  • round: _Round

dispose_when_done

[Source]

be dispose_when_done(
  disposable: DisposableActor tag,
  round: _Round)

Parameters


dispose

[Source]

be dispose()

log

[Source]

be log(
  msg: String val,
  verbose: Bool val = false)

Parameters


Public Functions

complete

[Source]

Complete the property execution successfully.

fun ref complete()
: None val

Returns


fail

[Source]

Complete the property execution while signalling failure.

fun ref fail(
  repr: String val,
  shrink_rounds: USize val = 0,
  err: Bool val = false)
: None val

Parameters

Returns