pub enum TestOption<'a, S> {
InitialCommands(fn() -> HashMap<&'static str, BuiltIn<S>>),
InitialCommandsDyn(Box<dyn Fn() -> HashMap<&'static str, BuiltIn<S>> + 'a>),
CustomVMInitialization(fn(&mut VM<S>)),
CustomVMInitializationDyn(Box<dyn Fn(&mut VM<S>) + 'a>),
AllowUndefinedCommands(bool),
}Expand description
Option passed to a test runner.
Variants§
InitialCommands(fn() -> HashMap<&'static str, BuiltIn<S>>)
The initial commands are the result of invoking the provided static function.
Overrides previous InitialCommands or InitialCommandsDyn options.
InitialCommandsDyn(Box<dyn Fn() -> HashMap<&'static str, BuiltIn<S>> + 'a>)
The initial commands are the result of invoking the provided closure.
Overrides previous InitialCommands or InitialCommandsDyn options.
CustomVMInitialization(fn(&mut VM<S>))
The provided static function is invoked after the VM is created and before execution starts. This can be used to provide more custom VM initialization.
Overrides previous CustomVMInitialization or CustomVMInitializationDyn options.
CustomVMInitializationDyn(Box<dyn Fn(&mut VM<S>) + 'a>)
The provided closure is invoked after the VM is created and before execution starts. This can be used to provide more custom VM initialization.
Overrides previous CustomVMInitialization or CustomVMInitializationDyn options.
AllowUndefinedCommands(bool)
Whether undefined commands raise an error.
Overrides previous AllowUndefinedCommands options.