aboutsummaryrefslogtreecommitdiff
path: root/tests/macros_try_join.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/macros_try_join.rs')
-rw-r--r--tests/macros_try_join.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/macros_try_join.rs b/tests/macros_try_join.rs
index 6c43222..c8ed00b 100644
--- a/tests/macros_try_join.rs
+++ b/tests/macros_try_join.rs
@@ -6,10 +6,10 @@ use std::sync::Arc;
use tokio::sync::{oneshot, Semaphore};
use tokio_test::{assert_pending, assert_ready, task};
-#[cfg(tokio_wasm_not_wasi)]
+#[cfg(all(target_family = "wasm", not(target_os = "wasi")))]
use wasm_bindgen_test::wasm_bindgen_test as maybe_tokio_test;
-#[cfg(not(tokio_wasm_not_wasi))]
+#[cfg(not(all(target_family = "wasm", not(target_os = "wasi"))))]
use tokio::test as maybe_tokio_test;
#[maybe_tokio_test]
@@ -183,3 +183,8 @@ async fn a_different_future_is_polled_first_every_time_poll_fn_is_polled() {
*poll_order.lock().unwrap()
);
}
+
+#[tokio::test]
+async fn empty_try_join() {
+ assert_eq!(tokio::try_join!() as Result<_, ()>, Ok(()));
+}