Attribute Macro tokio_macros::test_rt [−][src]
#[test_rt]
Expand description
Marks async function to be executed by runtime, suitable to test environment
Usage
#[tokio::test]
async fn my_test() {
assert!(true);
}
NOTE:
If you rename the Tokio crate in your dependencies this macro will not work.
If you must rename the current version of Tokio because you’re also using an
older version of Tokio, you must make the current version of Tokio
available as tokio
in the module where this macro is expanded.