跳到主要内容

test_rt

搜索

Attribute Macro test_rt 

Source
#[test_rt]
展开描述

将 async 函数标记为由运行时执行,适用于测试环境

§用法

#[tokio::test]
async fn my_test() {
    assert!(true);
}