Struct endbasic_std::testutils::Tester[][src]

pub struct Tester { /* fields omitted */ }
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.

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.

Gets the mock service client from the tester.

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

Sets the initial contents of the recorded program 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

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

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.