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

The name of the test. It's displayed in the output and used for all kinds of filtering.

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).

Whether or not this test should be ignored. If the --ignored flag is set, ignored tests are executed, too.

Whether this test is actually a benchmark.

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]

Creates a test with the given name, an empty kind and default data. The test is not ignored and is not a benchmark.

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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<D: Debug> Debug for Test<D>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<D> Send for Test<D> where
    D: Send

impl<D> Sync for Test<D> where
    D: Sync