pub trait TestResult: Sized {
    // Required methods
    fn run_singlethreaded(
        test: Arc<dyn Send + Sync + Fn(usize) -> Pin<Box<dyn Future<Output = Self>>>>,
        cfg: Config
    ) -> Self;
    fn run_until_stalled<F: 'static + Fn(usize) -> Fut, Fut: 'static + Future<Output = Self>>(
        executor: &mut TestExecutor,
        test: F,
        cfg: Config
    ) -> Poll<Self>;
}
Expand description

Defines how to compose multiple test runs for a kind of test result.

Required Methods§

source

fn run_singlethreaded( test: Arc<dyn Send + Sync + Fn(usize) -> Pin<Box<dyn Future<Output = Self>>>>, cfg: Config ) -> Self

How to repeatedly run a test with this result in a single threaded executor.

source

fn run_until_stalled<F: 'static + Fn(usize) -> Fut, Fut: 'static + Future<Output = Self>>( executor: &mut TestExecutor, test: F, cfg: Config ) -> Poll<Self>

Similarly, but use run_until_stalled

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TestResult for ()

source§

fn run_singlethreaded( test: Arc<dyn Send + Sync + Fn(usize) -> Pin<Box<dyn Future<Output = Self>>>>, cfg: Config ) -> Self

source§

fn run_until_stalled<F: 'static + Fn(usize) -> Fut, Fut: 'static + Future<Output = Self>>( executor: &mut TestExecutor, test: F, cfg: Config ) -> Poll<Self>

source§

impl<E: 'static + Debug> TestResult for Result<(), E>

source§

fn run_singlethreaded( test: Arc<dyn Send + Sync + Fn(usize) -> Pin<Box<dyn Future<Output = Self>>>>, cfg: Config ) -> Self

source§

fn run_until_stalled<F: 'static + Fn(usize) -> Fut, Fut: 'static + Future<Output = Self>>( executor: &mut TestExecutor, test: F, cfg: Config ) -> Poll<Self>

Implementors§