pub struct Tester { /* private fields */ }
Expand description

Builder pattern to prepare an EndBASIC machine for testing purposes.

Implementations§

Creates a new tester with an empty Machine.

Registers the given builtin command into the machine, which must not yet be registered.

Registers the given builtin function into the machine, which must not yet be registered.

Adds the golden_in characters as console input.

Adds a bunch of keys as golden input to the console.

Returns a mutable reference to the machine inside the tester.

This method should generally not be used, except to run native methods that have side-effects on the machine that we’d like to validate later.

Gets the mock console from the tester.

This method should generally not be used. Its primary utility is to hook externally-instantiated commands into the testing features.

Gets the recorded program from the tester.

This method should generally not be used. Its primary utility is to hook externally-instantiated commands into the testing features.

Gets the storage subsystem from the tester.

This method should generally not be used. Its primary utility is to hook externally-instantiated commands into the testing features.

Sets a variable to an initial value.

Sets the initial name of the recorded program to name (if any) and its contents to text. Can only be called once and text must not be empty.

Creates or overwrites a file in the storage medium.

Runs script in the configured machine and returns a Checker object to validate expectations about the execution.

Trait Implementations§

Creates a new tester for a fully-equipped (interactive) machine.

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.