macro_rules! test_with_one_runtime {
( $fn:expr ) => { ... };
}
Available on (crate features
native-tls
or rustls
) and (crate features tokio
or async-std
) only.Expand description
Run a test closure, passing as argument one supported runtime.
Usually, prefer tor_rtmock::MockRuntime::test_with_various
to this.
Use this macro only when you need to interact with things
that MockRuntime
can’t handle.
If everything in your test case is supported by MockRuntime
,
you should use that instead:
that will give superior test coverage and a (more) deterministic test.
(Always prefers tokio if present.)