pub trait AxTestExecutor: Sync {
// Required methods
fn name(&self) -> &'static str;
fn run(
&self,
test_fn: fn() -> AxTestResult,
) -> Result<AxTestResult, &'static str>;
}Expand description
Abstraction for how a single test function is executed.
Different runtimes can provide their own executor strategy, such as running each test in a dedicated thread, process, or inline on the current context.
Required Methods§
Sourcefn run(
&self,
test_fn: fn() -> AxTestResult,
) -> Result<AxTestResult, &'static str>
fn run( &self, test_fn: fn() -> AxTestResult, ) -> Result<AxTestResult, &'static str>
Execute one test case function and return its result.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".