Expand description
Test utilities for consumers of the EndBASIC interpreter.
Structs§
- Checker
- Captures expectations about the execution of a command and validates them.
- Mock
Console - A console that supplies golden input and captures all output.
- Recorded
Program - A stored program that exposes golden contents and accepts new content from the console when edits are requested.
- Tester
- Builder pattern to prepare an EndBASIC machine for testing purposes.
Enums§
- Captured
Out - A captured command or messages sent to the mock console.
Functions§
- check_
expr_ compilation_ error - Executes
expr
on a scripting interpreter and ensures that evaluation fails withexp_error
during compilation. - check_
expr_ error - Executes
expr
on a scripting interpreter and ensures that evaluation fails withexp_error
. - check_
expr_ ok - Executes
expr
on a scripting interpreter and ensures that the result isexp_value
. - check_
expr_ ok_ with_ vars - Executes
expr
on a scripting interpreter and ensures that the result isexp_value
. - check_
stmt_ compilation_ err - Executes
stmt
on a defaultTester
instance and checks that it fails withexp_error
during compilation. - check_
stmt_ err - Executes
stmt
on a defaultTester
instance and checks that it fails withexp_error
. - flatten_
output - Flattens the captured output into a single string resembling what would be shown in the console for ease of testing.