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§
Provided Methods§
Sourcefn find(
&self,
path_in_suite: &Path,
suite: Arc<TestSuite>,
config: Arc<TestConfig>,
) -> DiagResult<TestList>
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.