Trait TestSuiteRegistry

Source
pub trait TestSuiteRegistry: IntoIterator<Item = Arc<Test>> {
    // Required methods
    fn load(&mut self, config: &Config) -> DiagResult<()>;
    fn is_empty(&self) -> bool;
    fn num_suites(&self) -> usize;
    fn num_tests(&self) -> usize;
    fn size_of_suite(&self, id: &TestSuiteKey) -> usize;
    fn get(&self, id: &TestSuiteKey) -> Arc<TestSuite>;
    fn get_by_path(&self, path: &Path) -> Option<Arc<TestSuite>>;
    fn tests(&self) -> impl Iterator<Item = Arc<Test>> + '_;
    fn suites(&self) -> impl Iterator<Item = Arc<TestSuite>> + '_;
}

Required Methods§

Source

fn load(&mut self, config: &Config) -> DiagResult<()>

Load all available test suites

Source

fn is_empty(&self) -> bool

Returns true if there are no suites/tests in the registry

Source

fn num_suites(&self) -> usize

Returns the number of test suites in the registry

Source

fn num_tests(&self) -> usize

Returns the number of tests in the registry

Source

fn size_of_suite(&self, id: &TestSuiteKey) -> usize

Returns the number of tests in the registry belonging to a specific suite

Source

fn get(&self, id: &TestSuiteKey) -> Arc<TestSuite>

Get a TestSuite using its TestSuiteKey

Source

fn get_by_path(&self, path: &Path) -> Option<Arc<TestSuite>>

Get a TestSuite given the path at which it’s configuration resides

Source

fn tests(&self) -> impl Iterator<Item = Arc<Test>> + '_

Get an iterator over the tests in the registry

Source

fn suites(&self) -> impl Iterator<Item = Arc<TestSuite>> + '_

Get an iterator over the tests in the registry

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§