pub struct Checker<'a> { /* private fields */ }
Expand description

Captures expectations about the execution of a command and validates them.

Implementations§

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.

Expects the invocation to have erroneously terminated with the exact message that comes from an error that can be caught.

If not called, defaults to expecting that execution terminated due to EOF. This or expect_err can only be called once.

Expects the invocation to have erroneously terminated with the exact message that comes from an error that cannot be caught (such as a parse error).

If not called, defaults to expecting that execution terminated due to EOF. This or expect_err can only be called once.

Adds the name array as an array to expect in the final state of the machine. The array will be tested to have the same subtype and dimensions, as well as specific contents. The contents are provided as a collection of subscripts/value pairs to assign to the expected array.

Adds the name array as an array to expect in the final state of the machine. The array will be tested to have the same subtype and only one dimension with contents.

Adds tracking for all the side-effects of a clear operation on the machine.

Adds a file to expect in the drive with a name and specific content.

name must be the absolute path to the file that is expected, including the drive name.

Adds the out sequence of captured outputs to the expected outputs of the execution.

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.

Sets the expected name of the stored program to name and its contents to text. Can only be called once and text must not be empty.

Adds the name/value pair as a variable to expect in the final state of the machine.

Takes the captured output for separate analysis.

Validates all expectations.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.