[−][src]Struct lit::Config
The configuration of the test runner.
Fields
supported_file_extensions: Vec<String>
A list of file extensions which contain tests.
test_paths: Vec<PathBuf>
Paths to tests or folders containing tests.
constants: HashMap<String, String>
Constants that tests can refer to via @<name>
syntax.
variable_lookup: VariableLookup
A function which used to dynamically lookup variables.
The default variable lookup can be found at Config::DEFAULT_VARIABLE_LOOKUP
.
In your own custom variable lookups, most of the time you will want to
include a fallback call to Config::DEFAULT_VARIABLE_LOOKUP
.
cleanup_temporary_files: bool
Whether temporary files generated by the tests should be cleaned up, where possible.
This includes temporary files created by using @tempfile
variables.
dump_variable_resolution: bool
Whether verbose information about resolved variables should be printed to stderr.
Methods
impl Config
[src]
pub const DEFAULT_VARIABLE_LOOKUP: VariableLookup
[src]
The default variable lookup function.
The supported variables are:
- Any variable containing the string
"tempfile"
- Each distinct variable will be resolved to a distinct temporary file path.
pub fn add_extension<S>(&mut self, ext: S) where
S: Into<String>,
[src]
S: Into<String>,
Marks a file extension as supported by the runner.
We only attempt to run tests for files within the extension whitelist.
pub fn add_search_path<P>(&mut self, path: P) where
P: Into<String>,
[src]
P: Into<String>,
Adds a search path to the test runner.
We will recurse through the path to find tests.
pub fn is_extension_supported(&self, extension: &str) -> bool
[src]
Checks if a given extension will have tests run on it
pub fn lookup_variable<'a>(
&self,
name: &str,
variables: &'a mut HashMap<String, String>
) -> &'a str
[src]
&self,
name: &str,
variables: &'a mut HashMap<String, String>
) -> &'a str
Looks up a variable.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,