1 use maybe_async::maybe_async;
2 
3 #[maybe_async]
async_fn() -> bool4 async fn async_fn() -> bool {
5     true
6 }
7 
8 #[maybe_async::test(feature = "is_sync", async(not(feature = "is_sync"), async_std::test))]
test_async_fn()9 async fn test_async_fn() {
10     let res = async_fn().await;
11     assert_eq!(res, true);
12 }
13 
14 #[maybe_async::test(feature = "is_sync", async(not(feature = "is_sync"), tokio::test))]
test_async_fn2()15 async fn test_async_fn2() {
16     let res = async_fn().await;
17     assert_eq!(res, true);
18 }
19 
20 #[maybe_async::test(feature = "is_sync")]
test_async_fn3()21 async fn test_async_fn3() {
22     let res = async_fn().await;
23     assert_eq!(res, true);
24 }
25 
26 #[maybe_async::test(feature = "is_sync")]
test_sync_fn()27 async fn test_sync_fn() {
28     let res = async_fn();
29     assert_eq!(res, true);
30 }
31