Enum expectest::core::TestResult
[−]
[src]
pub enum TestResult {
Success,
Failure(Failure),
}Represents result of unit testing.
Variants
SuccessDenotes success.
Failure(Failure)Denotes failure.
Methods
impl TestResult[src]
pub fn new_success() -> Self[src]
Creates a new instance of TestResult with a Success variant.
pub fn new_failure(message: String, location: Option<SourceLocation>) -> Self[src]
Creates a new instance of TestResult with a Failure variant using message
and location.
pub fn assert_eq_message(self, message: &str)[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.