Trait TestRegistry

Source
pub trait TestRegistry {
    // Required method
    fn all(&self, suite: Arc<TestSuite>) -> DiagResult<TestList>;

    // Provided method
    fn find(
        &self,
        path_in_suite: &Path,
        suite: Arc<TestSuite>,
        config: Arc<TestConfig>,
    ) -> DiagResult<TestList> { ... }
}

Required Methods§

Source

fn all(&self, suite: Arc<TestSuite>) -> DiagResult<TestList>

Get the all tests belonging to suite, based on its provided configuration

Provided Methods§

Source

fn find( &self, path_in_suite: &Path, suite: Arc<TestSuite>, config: Arc<TestConfig>, ) -> DiagResult<TestList>

Search for tests belonging to suite which are located under path_in_suite, a file/directory path which must be located within suite.

The search takes into account the current configuration to ensure that only those tests that should be discoverable are found.

The default implementation of this function generates a single test from the given path, under the assumption that it is already valid. It is up to the test format to either override the default implementation, or raise an error if the test is invalid under these assumptions.

Implementations on Foreign Types§

Source§

impl<T: TestRegistry> TestRegistry for &T

Source§

fn all(&self, suite: Arc<TestSuite>) -> DiagResult<TestList>

Source§

fn find( &self, path_in_suite: &Path, suite: Arc<TestSuite>, config: Arc<TestConfig>, ) -> DiagResult<TestList>

Implementors§