pub struct PropertyTest { /* private fields */ }Expand description
Property-based test runner.
TigerStyle:
- Deterministic via seed
- Explicit operation count limits
- Invariant checking after each operation
- Time advancement control
Implementations§
Source§impl PropertyTest
impl PropertyTest
Sourcepub fn new(seed: u64) -> Self
pub fn new(seed: u64) -> Self
Create a new property test with the given seed.
§Panics
Panics if max_operations would exceed DST_SIMULATION_STEPS_MAX.
Sourcepub fn with_max_operations(self, max: u64) -> Self
pub fn with_max_operations(self, max: u64) -> Self
Set the maximum number of operations to run.
§Panics
Panics if max exceeds DST_SIMULATION_STEPS_MAX.
Sourcepub fn with_time_advance(self, config: TimeAdvanceConfig) -> Self
pub fn with_time_advance(self, config: TimeAdvanceConfig) -> Self
Configure time advancement between operations.
Sourcepub fn skip_initial_invariant_check(self) -> Self
pub fn skip_initial_invariant_check(self) -> Self
Disable checking invariants before the first operation.
Sourcepub fn run<T: PropertyTestable>(self, state: T) -> PropertyTestResult
pub fn run<T: PropertyTestable>(self, state: T) -> PropertyTestResult
Run the property test.
Generates random operations, applies them, and checks invariants after each operation. Returns detailed results.
Sourcepub fn run_and_assert<T: PropertyTestable>(self, state: T)
pub fn run_and_assert<T: PropertyTestable>(self, state: T)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PropertyTest
impl RefUnwindSafe for PropertyTest
impl Send for PropertyTest
impl Sync for PropertyTest
impl Unpin for PropertyTest
impl UnwindSafe for PropertyTest
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