Skip to content

PropertyParams

[Source]

Configuration for a property test: sample count, seed, shrink budget, health-check limits, and regression persistence.

  • seed — PRNG seed. Defaults to Time.millis() for variety across runs. Fix to a constant to reproduce a failure.
  • num_samples — how many generated samples to run.
  • max_shrink_reductions — budget for shrink candidates per failure.
  • max_generator_retries — consecutive generator errors before the property is abandoned.
  • timeout — default timeout in nanoseconds, available as a convenience for passing to h.long_test(params().timeout) in async properties.
  • max_filter_discard_ratio — ratio of discarded to accepted filter draws before the health check fails.
  • max_choice_sequence_size — total random draws per sample before the health check fails.
  • max_sample_nanos — wall-clock nanoseconds per sample before the health check warns.
  • regression_db — whether to persist and replay failing choice sequences via the .ponytest/ directory.
class val PropertyParams is
  Stringable box

Implements


Constructors

create

[Source]

new val create(
  num_samples': USize val = 100,
  seed': U64 val = Time.millis(),
  max_shrink_reductions': USize val = 100,
  max_generator_retries': USize val = 5,
  timeout': U64 val = 60_000_000_000,
  max_filter_discard_ratio': F64 val = PropertyParamsDefaults.max_filter_discard_ratio(),
  max_choice_sequence_size': USize val = PropertyParamsDefaults.max_choice_sequence_size(),
  max_sample_nanos': U64 val = PropertyParamsDefaults.max_sample_nanos(),
  regression_db': Bool val = true)
: PropertyParams val^

Parameters

  • num_samples': USize val = 100
  • seed': U64 val = Time.millis()
  • max_shrink_reductions': USize val = 100
  • max_generator_retries': USize val = 5
  • timeout': U64 val = 60_000_000_000
  • max_filter_discard_ratio': F64 val = PropertyParamsDefaults.max_filter_discard_ratio()
  • max_choice_sequence_size': USize val = PropertyParamsDefaults.max_choice_sequence_size()
  • max_sample_nanos': U64 val = PropertyParamsDefaults.max_sample_nanos()
  • regression_db': Bool val = true

Returns


Public fields

let seed: U64 val

[Source]


let num_samples: USize val

[Source]


let max_shrink_reductions: USize val

[Source]


let max_generator_retries: USize val

[Source]


let timeout: U64 val

[Source]


let max_filter_discard_ratio: F64 val

[Source]


let max_choice_sequence_size: USize val

[Source]


let max_sample_nanos: U64 val

[Source]


let regression_db: Bool val

[Source]


Public Functions

string

[Source]

fun box string()
: String iso^

Returns