pub struct TestConfig {
pub iterations: usize,
pub max_shrink_iterations: usize,
pub shrink_timeout: Duration,
pub seed: Option<u64>,
pub generator_config: GeneratorConfig,
}Expand description
Configuration for individual property tests
Fields§
§iterations: usizeNumber of test iterations to run
max_shrink_iterations: usizeMaximum number of shrinking iterations
shrink_timeout: DurationTimeout for shrinking process
seed: Option<u64>Optional seed for reproducible tests
generator_config: GeneratorConfigGenerator configuration overrides
Implementations§
Source§impl TestConfig
impl TestConfig
Sourcepub fn new(
iterations: usize,
max_shrink_iterations: usize,
shrink_timeout: Duration,
seed: Option<u64>,
generator_config: GeneratorConfig,
) -> Result<Self, ConfigError>
pub fn new( iterations: usize, max_shrink_iterations: usize, shrink_timeout: Duration, seed: Option<u64>, generator_config: GeneratorConfig, ) -> Result<Self, ConfigError>
Create a new test configuration with validation
Sourcepub fn validate(&self) -> Result<(), ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Validate the test configuration
Sourcepub fn merge_with_global(self, global: &GlobalConfig) -> Self
pub fn merge_with_global(self, global: &GlobalConfig) -> Self
Merge this configuration with a global configuration, with this config taking precedence
Sourcepub fn from_global_with_overrides(
global: &GlobalConfig,
iterations: Option<usize>,
seed: Option<u64>,
generator_overrides: Option<GeneratorConfig>,
) -> Result<Self, ConfigError>
pub fn from_global_with_overrides( global: &GlobalConfig, iterations: Option<usize>, seed: Option<u64>, generator_overrides: Option<GeneratorConfig>, ) -> Result<Self, ConfigError>
Create a test configuration from global defaults with optional overrides
Trait Implementations§
Source§impl Clone for TestConfig
impl Clone for TestConfig
Source§fn clone(&self) -> TestConfig
fn clone(&self) -> TestConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TestConfig
impl Debug for TestConfig
Auto Trait Implementations§
impl Freeze for TestConfig
impl !RefUnwindSafe for TestConfig
impl Send for TestConfig
impl Sync for TestConfig
impl Unpin for TestConfig
impl !UnwindSafe for TestConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more