What a @property test runs: body on count generated inputs. Call it by hand to give
the arguments custom generators or another count.
run_property(t, (a: s32, b: s32) {
expect_equal(cast(s64) a + b, cast(s64) b + a);
}, 50);- t: the running test.
- $body: the property; its arguments are generated.
- count: how many trials to run.
- generators: custom generators that replace the built-in ones for their types.
run_property :: (
t: *Test,
$body: $B,
count: s64 = DEFAULT_TRIALS,
generators: [] Custom_Generator = .[]
)
What a @property test runs: body on count generated inputs. Call it by hand to give
the arguments custom generators or another count.
Parameters
- t: *Test
- the running test.
- $body: $B
- the property; its arguments are generated.
- count: s64 = DEFAULT_TRIALS
- how many trials to run.
- generators: [] Custom_Generator = .[]
- custom generators that replace the built-in ones for their types.
run_property(t, (a: s32, b: s32) {
expect_equal(cast(s64) a + b, cast(s64) b + a);
}, 50);