Enum texlang_testing::TestOption
source · pub enum TestOption<'a, S> {
BuiltInCommands(fn() -> HashMap<&'static str, BuiltIn<S>>),
BuiltInCommandsDyn(Box<dyn Fn() -> HashMap<&'static str, BuiltIn<S>> + 'a>),
CustomVMInitialization(fn(_: &mut VM<S>)),
CustomVMInitializationDyn(Box<dyn Fn(&mut VM<S>) + 'a>),
AllowUndefinedCommands(bool),
RecoverFromErrors(bool),
}
Expand description
Option passed to a test runner.
Variants§
BuiltInCommands(fn() -> HashMap<&'static str, BuiltIn<S>>)
The built-in commands are the result of invoking the provided static function.
Overrides previous InitialCommands
or InitialCommandsDyn
options.
BuiltInCommandsDyn(Box<dyn Fn() -> HashMap<&'static str, BuiltIn<S>> + 'a>)
The built-in 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.
RecoverFromErrors(bool)
Whether to recover from errors.
Overrides previous RecoverFromErrors
options.