pub struct TestCase {
    pub name: String,
    pub time: Duration,
    pub result: TestResult,
    pub classname: Option<String>,
    pub filepath: Option<String>,
    pub system_out: Option<String>,
    pub system_err: Option<String>,
}
Expand description

One single test case

Fields

name: Stringtime: Durationresult: TestResultclassname: Option<String>filepath: Option<String>system_out: Option<String>system_err: Option<String>

Implementations

Creates a new successful TestCase

Set the classname for the TestCase

Set the file for the TestCase

Set the system_out for the TestCase

Set the system_err for the TestCase

Check if a TestCase is successful

Creates a new erroneous TestCase

An erroneous TestCase is one that encountered an unexpected error condition.

Check if a TestCase is erroneous

Creates a new failed TestCase

A failed TestCase is one where an explicit assertion failed

Check if a TestCase failed

Create a new ignored TestCase

An ignored TestCase is one where an ignored or skipped

Check if a TestCase ignored

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.