Struct speculoos::AssertionFailure
source · pub struct AssertionFailure<'r, T: 'r> { /* private fields */ }
Expand description
A failed assertion.
This exposes builder methods to construct the final failure message.
Implementations§
source§impl<'r, T: DescriptiveSpec<'r>> AssertionFailure<'r, T>
impl<'r, T: DescriptiveSpec<'r>> AssertionFailure<'r, T>
sourcepub fn from_spec(spec: &'r T) -> AssertionFailure<'r, T>
pub fn from_spec(spec: &'r T) -> AssertionFailure<'r, T>
Construct a new AssertionFailure from a DescriptiveSpec.
sourcepub fn with_expected(&mut self, expected: String) -> &mut Self
pub fn with_expected(&mut self, expected: String) -> &mut Self
Builder method to add the expected value for the panic message.
sourcepub fn with_actual(&mut self, actual: String) -> &mut Self
pub fn with_actual(&mut self, actual: String) -> &mut Self
Builder method to add the actual value for the panic message.