1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
use super::*; #[test] fn simple() { let res = block_on(async { spawn_local(async { for _ in 0..10 { println!("Hello, again!"); } }) .detach(); for _ in 0..3 { println!("Hello, world!"); } 1 }); assert_eq!(res, 1); }