Enum galvanic_assert::Expectation
[−]
[src]
pub enum Expectation {
Failed {
assertion: String,
file: String,
line: u32,
error_msg: String,
},
Satisfied,
}The result of a deferred assertion.
Variants
FailedFields of Failed
assertion: String | A representation of the failed assertion. |
file: String | The file where the expection has been created. |
line: u32 | The source code line where the expectation has been created. |
error_msg: String | The reason why the expectation has not been met. |
SatisfiedMethods
impl Expectation[src]
fn failed(assertion: String,
file: String,
line: u32,
error_msg: String)
-> Expectation
file: String,
line: u32,
error_msg: String)
-> Expectation
Creates a failed Expectation
fn satisfied() -> Expectation
Create a satisfied Expectation
fn verify(self)
Verifies if the asseration given by the Expectation held.
Panics if the verification fails.
Trait Implementations
impl Drop for Expectation[src]
If the Expectation is dropped it is automatically verified.
impl Display for Expectation[src]
fn fmt(&self, f: &mut Formatter) -> FormatResult
Formats the value using the given formatter.