Struct quick_junit::TestCase[][src]

#[non_exhaustive]
pub struct TestCase { pub name: String, pub classname: Option<String>, pub assertions: Option<usize>, pub timestamp: Option<DateTime<FixedOffset>>, pub time: Option<Duration>, pub status: TestCaseStatus, pub system_out: Option<Output>, pub system_err: Option<Output>, pub extra: IndexMap<String, String>, }
Expand description

Represents a single test case.

Fields (Non-exhaustive)

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
name: String

The name of the test case.

classname: Option<String>

The “classname” of the test case.

Typically, this represents the fully qualified path to the test. In other words, classname + name together should uniquely identify and locate a test.

assertions: Option<usize>

The number of assertions in the test case.

timestamp: Option<DateTime<FixedOffset>>

The time at which this test case began execution.

This is not part of the JUnit spec, but may be useful for some tools.

time: Option<Duration>

The time it took to execute this test case.

status: TestCaseStatus

The status of this test.

system_out: Option<Output>

Data written to standard output while the test case was executed.

system_err: Option<Output>

Data written to standard error while the test case was executed.

extra: IndexMap<String, String>

Other fields that may be set as attributes, such as “classname”.

Implementations

Creates a new test case.

Sets the classname of the test.

Sets the number of assertions in the test case.

Sets the start timestamp for the test case.

Sets the time taken for the test case.

Sets standard output.

Sets standard output from a Vec<u8>.

The output is converted to a string, lossily.

Sets standard error.

Sets standard error from a Vec<u8>.

The output is converted to a string, lossily.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.