Struct lit::Config [−][src]
pub struct Config { pub supported_file_extensions: Vec<String>, pub test_paths: Vec<PathBuf>, pub constants: HashMap<String, String>, }
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.
Methods
impl Config
[src]
impl Config
pub fn add_extension<S>(&mut self, ext: S) where
S: Into<String>,
[src]
pub fn add_extension<S>(&mut self, ext: S) where
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]
pub fn add_search_path<P>(&mut self, path: P) where
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]
pub fn is_extension_supported(&self, extension: &str) -> bool
Checks if a given extension will have tests run on it
Trait Implementations
impl Clone for Config
[src]
impl Clone for Config
fn clone(&self) -> Config
[src]
fn clone(&self) -> Config
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Config
[src]
impl Debug for Config
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for Config
[src]
impl Default for Config