Trait TestFilter
pub trait TestFilter: Send + Sync {
// Required methods
fn matches_test(&self, test_signature: &str) -> bool;
fn matches_contract(&self, contract_name: &str) -> bool;
fn matches_path(&self, path: &Path) -> bool;
// Provided method
fn matches_test_function_in_contract(
&self,
_contract_id: &str,
func: &Function,
) -> bool { ... }
}Expand description
Test filter.
Required Methods§
fn matches_test(&self, test_signature: &str) -> bool
fn matches_test(&self, test_signature: &str) -> bool
Returns whether the test should be included.
fn matches_contract(&self, contract_name: &str) -> bool
fn matches_contract(&self, contract_name: &str) -> bool
Returns whether the contract should be included.
fn matches_path(&self, path: &Path) -> bool
fn matches_path(&self, path: &Path) -> bool
Returns a contract with the given path should be included.
Provided Methods§
fn matches_test_function_in_contract(
&self,
_contract_id: &str,
func: &Function,
) -> bool
fn matches_test_function_in_contract( &self, _contract_id: &str, func: &Function, ) -> bool
Returns whether the test should be included for the given contract.
contract_id is the full artifact identifier (path:Contract).
Implementations§
§impl<'a> dyn TestFilter + 'a
impl<'a> dyn TestFilter + 'a
pub fn matches_test_function(&self, func: &Function) -> bool
pub fn matches_test_function(&self, func: &Function) -> bool
Returns true if the function is a test function that matches the given filter.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".