Struct proptest::test_runner::Config
[−]
[src]
pub struct Config {
pub cases: u32,
pub max_local_rejects: u32,
pub max_global_rejects: u32,
pub max_flat_map_regens: u32,
pub failure_persistence: FailurePersistence,
// some fields omitted
}Configuration for how a proptest test should be run.
Fields
cases: u32
The number of successful test cases that must execute for the test as a whole to pass.
This does not include implicitly-replayed persisted failing cases.
The default is 256, which can be overridden by setting the
PROPTEST_CASES environment variable.
max_local_rejects: u32
The maximum number of individual inputs that may be rejected before the test as a whole aborts.
The default is 65536, which can be overridden by setting the
PROPTEST_MAX_LOCAL_REJECTS environment variable.
max_global_rejects: u32
The maximum number of combined inputs that may be rejected before the test as a whole aborts.
The default is 1024, which can be overridden by setting the
PROPTEST_MAX_GLOBAL_REJECTS environment variable.
max_flat_map_regens: u32
The maximum number of times all Flatten combinators will attempt to
regenerate values. This puts a limit on the worst-case exponential
explosion that can happen with nested Flattens.
The default is 1_000_000, which can be overridden by setting the
PROPTEST_MAX_FLAT_MAP_REGENS environment variable.
failure_persistence: FailurePersistence
Indicates how to determine the file to use for persisting failed test results.
See the docs of FailurePersistence
for more information.
The default is FailurePersistence::SourceParallel("proptest-regressions").
The default cannot currently be overridden by an environment variable.
Methods
impl Config[src]
fn with_cases(n: u32) -> Self[src]
Constructs a Config only differing from the default() in the
number of test cases required to pass the test successfully.
This is simply a more concise alternative to using field-record update syntax:
assert_eq!( Config::with_cases(42), Config { cases: 42, .. Config::default() } );
Trait Implementations
impl Clone for Config[src]
fn clone(&self) -> Config[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Debug for Config[src]
impl PartialEq for Config[src]
fn eq(&self, __arg_0: &Config) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Config) -> bool[src]
This method tests for !=.