[−][src]Attribute Macro async_std::test
#[test]
This is supported on
attributes only.Marks async function to be executed by runtime, suitable to test environment
Options:
core_threads=n- Sets core threads ton(requiresrt-threadedfeature).max_threads=n- Sets max threads ton(requiresrt-coreorrt-threadedfeature).
Usage
Select runtime
#[tokio::test(core_threads = 1)] async fn my_test() { assert!(true); }
Using default
#[tokio::test] async fn my_test() { assert!(true); }