pub struct TestCase { /* private fields */ }
Expand description
A struct representing a test case definide using the #[
tarantool::test
]
macro attribute. Can be used to implement a custom testing harness.
See also collect_tester
.
Implementations§
Source§impl TestCase
impl TestCase
Sourcepub const fn new(name: &'static str, f: fn(), should_panic: bool) -> TestCase
pub const fn new(name: &'static str, f: fn(), should_panic: bool) -> TestCase
Creates a new test case.
This function is called when #[
tarantool::test
]
attribute is
used, so users don’t usually use it directly.
Sourcepub const fn name(&self) -> &str
pub const fn name(&self) -> &str
Get test case name. This is usually a full path to the test function.
Sourcepub fn should_panic(&self) -> bool
pub fn should_panic(&self) -> bool
Check if the test case should panic.
Sourcepub const fn to_tester(&self) -> TestDescAndFn
pub const fn to_tester(&self) -> TestDescAndFn
Convert the test case into a struct that can be used with the tester
crate.
Trait Implementations§
impl Eq for TestCase
impl StructuralPartialEq for TestCase
Auto Trait Implementations§
impl Freeze for TestCase
impl RefUnwindSafe for TestCase
impl Send for TestCase
impl Sync for TestCase
impl Unpin for TestCase
impl UnwindSafe for TestCase
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