Struct proptest::test_runner::TestRunner [] [src]

pub struct TestRunner { /* fields omitted */ }

State used when running a proptest test.

Methods

impl TestRunner
[src]

[src]

Create a fresh TestRunner with the given configuration.

[src]

Returns the RNG for this test run.

[src]

Create a new, independent but deterministic RNG from the RNG in this runner.

[src]

Returns the configuration of this runner.

[src]

Set the source file to use for resolving the location of the persisted failing cases file.

The source location can only be used if it is absolute. If source is not an absolute path, an attempt will be made to determine the absolute path based on the current working directory and its parents. If no absolute path can be determined, a warning will be printed and proptest will continue as if this function had never been called.

See FailurePersistence for details on how this value is used once it is made absolute.

This is normally called automatically by the proptest! macro, which passes file!().

[src]

Run test cases against f, choosing inputs via strategy.

If any failure cases occur, try to find a minimal failure case and report that. If invoking f panics, the panic is turned into a TestCaseError::Fail.

If failure persistence is enabled, all persisted failing cases are tested first. If a later non-persisted case fails, its seed is persisted before returning failure.

Returns success or failure indicating why the test as a whole failed.

[src]

Run one specific test case against this runner.

If the test fails, finds the minimal failing test case. If the test does not fail, returns whether it succeeded or was filtered out.

[src]

Update the state to account for a local rejection from whence, and return Ok if the caller should keep going or Err to abort.

[src]

Increment the counter of flat map regenerations and return whether it is still under the configured limit.

Trait Implementations

impl Clone for TestRunner
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for TestRunner
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for TestRunner
[src]

[src]

Formats the value using the given formatter. Read more

impl Default for TestRunner
[src]

Equivalent to: TestRunner::new(Config::default()).

[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for TestRunner

impl Sync for TestRunner