From c90757f07a1b15d7e26a710003d8e98a83db1ffc Mon Sep 17 00:00:00 2001 From: Chris Wailes Date: Sat, 21 Jan 2023 02:12:24 -0800 Subject: [PATCH] tests: condition unwinding tests on `cfg(panic = "unwind")` (#5384) --- tokio/tests/sync_broadcast.rs | 1 + tokio/tests/sync_watch.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/tokio/tests/sync_broadcast.rs b/tokio/tests/sync_broadcast.rs index 67c378b84a6..cd6692448bb 100644 --- a/tokio/tests/sync_broadcast.rs +++ b/tokio/tests/sync_broadcast.rs @@ -291,6 +291,7 @@ fn capacity_too_big() { } #[test] +#[cfg(panic = "unwind")] #[cfg(not(tokio_wasm))] // wasm currently doesn't support unwinding fn panic_in_clone() { use std::panic::{self, AssertUnwindSafe}; diff --git a/tokio/tests/sync_watch.rs b/tokio/tests/sync_watch.rs index 34f9b786710..d4f8ce87d95 100644 --- a/tokio/tests/sync_watch.rs +++ b/tokio/tests/sync_watch.rs @@ -213,6 +213,7 @@ fn reopened_after_subscribe() { } #[test] +#[cfg(panic = "unwind")] #[cfg(not(tokio_wasm))] // wasm currently doesn't support unwinding fn send_modify_panic() { let (tx, mut rx) = watch::channel("one");