[−][src]Struct monarch::MetamorphicTestRunner
The struct responsible for running the metamorphic test suite.
Methods
impl<IN: Clone + Debug, OUT: UnwindSafe> MetamorphicTestRunner<IN, OUT>
[src]
pub fn new() -> Self
[src]
Construct a new test runner.
pub fn add_transformation(&mut self, f: impl Fn(&mut IN) -> IN + 'static)
[src]
Supply an additional way of transforming an input.
pub fn set_input(&mut self, input: IN)
[src]
Set the initial input.
This initial input along with the operation will be used to compute an output against which all other outputs will be compared using the supplied metamorphic relation.
pub fn set_operation(&mut self, f: impl Fn(&IN) -> OUT + 'static)
[src]
Set the operation which will be used to compute an output for each input.
pub fn set_relation(&mut self, f: impl Fn(&OUT, &OUT) -> bool + 'static)
[src]
Set the metamorphic relation which determines whether two outputs pass the test.
pub fn run(&mut self) -> Result<(), MonarchError>
[src]
Run the metamorphic test.
Trait Implementations
impl<IN: Clone + Debug, OUT: UnwindSafe> Default for MetamorphicTestRunner<IN, OUT>
[src]
Auto Trait Implementations
impl<IN, OUT> !Send for MetamorphicTestRunner<IN, OUT>
impl<IN, OUT> !Sync for MetamorphicTestRunner<IN, OUT>
impl<IN, OUT> Unpin for MetamorphicTestRunner<IN, OUT> where
IN: Unpin,
IN: Unpin,
impl<IN, OUT> !UnwindSafe for MetamorphicTestRunner<IN, OUT>
impl<IN, OUT> !RefUnwindSafe for MetamorphicTestRunner<IN, OUT>
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,