Struct test_casing::decorators::Sequence
source · pub struct Sequence { /* private fields */ }
Expand description
Test decorator that makes runs of decorated tests sequential. The sequence can optionally be aborted if a test in it fails.
The run ordering of tests in the sequence is not deterministic. This is because depending on the command-line args that the test was launched with, not all tests in the sequence may run at all.
§Examples
use test_casing::{decorate, decorators::{Sequence, Timeout}};
static SEQUENCE: Sequence = Sequence::new().abort_on_failure();
#[test]
#[decorate(&SEQUENCE)]
fn sequential_test() {
// test logic
}
#[test]
#[decorate(Timeout::secs(1), &SEQUENCE)]
fn other_sequential_test() {
// test logic
}
Implementations§
Trait Implementations§
source§impl DecorateTest<()> for Sequence
impl DecorateTest<()> for Sequence
source§fn decorate_and_test<F: TestFn<()>>(&self, test_fn: F)
fn decorate_and_test<F: TestFn<()>>(&self, test_fn: F)
Decorates the provided test function and runs the test.
Auto Trait Implementations§
impl !Freeze for Sequence
impl RefUnwindSafe for Sequence
impl Send for Sequence
impl Sync for Sequence
impl Unpin for Sequence
impl UnwindSafe for Sequence
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