[−][src]Enum expectest::core::TestResult
Represents result of unit testing.
Variants
Denotes 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.
Trait Implementations
Auto Trait Implementations
impl Send for TestResult
impl Sync for TestResult
impl Unpin for TestResult
impl UnwindSafe for TestResult
impl RefUnwindSafe for TestResult
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,