Struct libtest_mimic::Test [−][src]
pub struct Test<D = ()> { pub name: String, pub kind: String, pub is_ignored: bool, pub is_bench: bool, pub data: D, }
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.
Methods
impl<D: Default> Test<D>
[src]
impl<D: Default> Test<D>
pub fn test(
name: impl Into<String>
) -> Self
[src]
pub fn test(
name: impl Into<String>
) -> Self
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]
pub fn bench(
name: impl Into<String>
) -> Self
Creates a benchmark with the given name, an empty kind
and default
data. The benchmark is not ignored.
Trait Implementations
impl<D: Clone> Clone for Test<D>
[src]
impl<D: Clone> Clone for Test<D>
fn clone(&self) -> Test<D>
[src]
fn clone(&self) -> Test<D>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<D: Debug> Debug for Test<D>
[src]
impl<D: Debug> Debug for Test<D>