[−][src]Struct endbasic_std::testutils::Checker
Captures expectations about the execution of a command and validates them.
Implementations
impl<'a> Checker<'a>[src]
pub fn expect_ok(mut self: Self, stop_reason: StopReason) -> Self[src]
Expects the invocation to have successfully terminated with the given stop_reason.
If not called, defaults to expecting that execution terminated due to EOF. This or
expect_err can only be called once.
pub fn expect_err<S: Into<String>>(mut self: Self, message: S) -> Self[src]
Expects the invocation to have erroneously terminated with the exact message.
If not called, defaults to expecting that execution terminated due to EOF. This or
expect_err can only be called once.
pub fn expect_file<N: Into<String>, C: Into<String>>(
mut self: Self,
name: N,
content: C
) -> Self[src]
mut self: Self,
name: N,
content: C
) -> Self
Adds a file to expect in the store with a name and specific content.
pub fn expect_output<V: Into<Vec<CapturedOut>>>(mut self: Self, out: V) -> Self[src]
Adds the out sequence of captured outputs to the expected outputs of the execution.
pub fn expect_prints<S: Into<String>, V: Into<Vec<S>>>(
mut self: Self,
out: V
) -> Self[src]
mut self: Self,
out: V
) -> Self
Adds the out sequence of strings to the expected outputs of the execution.
This is a convenience function around expect_output that wraps all incoming strings in
CapturedOut::Print objects, as these are the most common outputs in tests.
pub fn expect_program<S: Into<String>>(mut self: Self, text: S) -> Self[src]
Sets the expected contents of the stored program to text. Can only be called once and
text must not be empty.
pub fn expect_var<S: Into<String>, V: Into<Value>>(
mut self: Self,
name: S,
value: V
) -> Self[src]
mut self: Self,
name: S,
value: V
) -> Self
Adds the name/value pair as a variable to expect in the final state of the machine.
pub fn check(self)[src]
Validates all expectations.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Checker<'a>[src]
impl<'a> !Send for Checker<'a>[src]
impl<'a> !Sync for Checker<'a>[src]
impl<'a> Unpin for Checker<'a>[src]
impl<'a> !UnwindSafe for Checker<'a>[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,