Skip to main content

conformance_test

Macro conformance_test 

Source
macro_rules! conformance_test {
    ($name:ident, $body:expr) => { ... };
}
Expand description

Macro for defining conformance tests.

This macro defines a test that will be run against conformance targets. The test receives a TestConfig and should use a ConformanceTarget implementation to execute the test.

§Example

use asupersync::conformance::{conformance_test, TestConfig};

conformance_test!(test_spawn_completes, |config: &TestConfig| {
    use asupersync::conformance::ConformanceTarget;
    use asupersync::lab::LabRuntime;

    // Create runtime and run test
    let mut runtime = LabRuntimeTarget::create_runtime(config.clone());
    LabRuntimeTarget::block_on(&mut runtime, async {
        // Test implementation
    });
});