[go: up one dir, main page]

Enum expectest::core::TestResult [] [src]

pub enum TestResult {
    Success,
    Failure(Failure),
}

Represents result of unit testing.

Variants

Denotes success.

Denotes failure.

Methods

impl TestResult
[src]

[src]

Creates a new instance of TestResult with a Success variant.

[src]

Creates a new instance of TestResult with a Failure variant using message and location.

[src]

Asserts that message is equal to the failure message.

Purpose of this method is the unit testing of failure messages. Convenient for development.

Example

expect(0 == 1).to(be_true()).assert_eq_message("expected to be true");

Panics

This method panics if the failure message is not equal to the message, or self is not the TestResult::Failure variant.

Trait Implementations

impl Debug for TestResult
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for TestResult

impl Sync for TestResult