mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
macros: custom crate name for #[tokio::main] and #[tokio::test] (#4613)
This also enables `#[crate::test(crate = "crate")]` in unit tests. See: rust-lang/cargo#5653 Fixes: #2312
This commit is contained in:
@@ -33,6 +33,15 @@ async fn test_worker_threads_not_int() {}
|
||||
#[tokio::test(flavor = "current_thread", worker_threads = 4)]
|
||||
async fn test_worker_threads_and_current_thread() {}
|
||||
|
||||
#[tokio::test(crate = 456)]
|
||||
async fn test_crate_not_ident_int() {}
|
||||
|
||||
#[tokio::test(crate = "456")]
|
||||
async fn test_crate_not_ident_invalid() {}
|
||||
|
||||
#[tokio::test(crate = "abc::edf")]
|
||||
async fn test_crate_not_ident_path() {}
|
||||
|
||||
#[tokio::test]
|
||||
#[test]
|
||||
async fn test_has_second_test_attr() {}
|
||||
|
||||
Reference in New Issue
Block a user