#[test_runtimes]
Expand description

Test the function against different runtimes

use crate::generic::config::Runtime;

#[test_runtimes([development, altair, centrifuge])]
fn foo<T: Runtime> {
    // Your test here...
}

You can test all runtimes also as:

use crate::generic::config::Runtime;

#[test_runtimes(all)]
fn foo<T: Runtime> {
    // Your test here...
}

You can also ignore them:

use crate::generic::config::Runtime;

#[test_runtimes([development, altair, centrifuge], ignore = "reason")]
fn foo<T: Runtime> {
    // Your test here...
}

#[test_runtimes(all, ignore = "reason")]
fn foo<T: Runtime> {
    // Your test here...
}

You can test for fudge support adding the bound:

use crate::generic::{config::Runtime, envs::fudge_env::FudgeSupport};

#[test_runtimes(all)]
fn foo<T: Runtime + FudgeSupport> {
    // Your test here...
}

For the following command: cargo test -p runtime-integration-tests foo, it will generate the following output:

test generic::foo::altair ... ok
test generic::foo::development ... ok
test generic::foo::centrifuge ... ok

Available input for the argument is:

  • Any combination of development, altair, centrifuge inside [].
  • The world all.