1#![cfg(all(feature = "full", not(target_os = "wasi")))] // Wasi doesn't support threading
2
3#[allow(unused_imports)]
4use std as tokio;
5
6use ::tokio as tokio1;
7
8mod test {
9 pub use ::tokio;
10}
11
12async fn compute() -> usize {
13 let join = tokio1::spawn(async { 1 });
14 join.await.unwrap()
15}
16
17#[tokio1::main(crate = "tokio1")]
18async fn compute_main() -> usize {
19 compute().await
20}
21
22#[test]
23fn crate_rename_main() {
24 assert_eq!(1, compute_main());
25}
26
27#[tokio1::test(crate = "tokio1")]
28async fn crate_rename_test() {
29 assert_eq!(1, compute().await);
30}
31
32#[test::tokio::test(crate = "test::tokio")]
33async fn crate_path_test() {
34 assert_eq!(1, compute().await);
35}
36