[−][src]Struct libtest_mimic::Test
Description of a single test.
Fields
name: String
The name of the test. It's displayed in the output and used for all kinds of filtering.
kind: String
Optional string to describe the kind of test. If this string is not
empty, it is printed in brackets before the test name (e.g.
test [my-kind] test_name
).
is_ignored: bool
Whether or not this test should be ignored. If the --ignored
flag is
set, ignored tests are executed, too.
is_bench: bool
Whether this test is actually a benchmark.
data: D
Custom data. This field is not used by this library and can instead be used to store arbitrary data per test.
Implementations
impl<D: Default> Test<D>
[src]
pub fn test(name: impl Into<String>) -> Self
[src]
Creates a test with the given name, an empty kind
and default data.
The test is not ignored and is not a benchmark.
pub fn bench(name: impl Into<String>) -> Self
[src]
Creates a benchmark with the given name, an empty kind
and default
data. The benchmark is not ignored.
Trait Implementations
Auto Trait Implementations
impl<D> RefUnwindSafe for Test<D> where
D: RefUnwindSafe,
D: RefUnwindSafe,
impl<D> Send for Test<D> where
D: Send,
D: Send,
impl<D> Sync for Test<D> where
D: Sync,
D: Sync,
impl<D> Unpin for Test<D> where
D: Unpin,
D: Unpin,
impl<D> UnwindSafe for Test<D> where
D: UnwindSafe,
D: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,