pub struct TestBlock { /* private fields */ }Expand description
A TestBlock organizes test cases together under one umbrella.
Implementations§
Source§impl TestBlock
impl TestBlock
Sourcepub fn add_test<T: Into<String>>(
&mut self,
test: impl FnOnce() -> bool + Sync + Send + 'static,
description: T,
diagnostics: Option<Vec<String>>,
)
pub fn add_test<T: Into<String>>( &mut self, test: impl FnOnce() -> bool + Sync + Send + 'static, description: T, diagnostics: Option<Vec<String>>, )
Add a new test case.
Sourcepub fn fail<T: Into<String>>(
&mut self,
description: T,
diagnostics: Option<Vec<String>>,
)
pub fn fail<T: Into<String>>( &mut self, description: T, diagnostics: Option<Vec<String>>, )
Add a test failure.
Sourcepub fn succeed<T: Into<String>>(
&mut self,
description: T,
diagnostics: Option<Vec<String>>,
)
pub fn succeed<T: Into<String>>( &mut self, description: T, diagnostics: Option<Vec<String>>, )
Add a test success.
Sourcepub fn add_diagnostic_messages(&mut self, messages: Vec<String>)
pub fn add_diagnostic_messages(&mut self, messages: Vec<String>)
Add diagnostic messages to this test block.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TestBlock
impl !RefUnwindSafe for TestBlock
impl Send for TestBlock
impl Sync for TestBlock
impl Unpin for TestBlock
impl !UnwindSafe for TestBlock
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