From 9dae4cf1f0f2fd82ee653d89abc46d349b6e6caa Mon Sep 17 00:00:00 2001 From: Ben Blum Date: Thu, 21 Feb 2013 19:42:18 -0500 Subject: [PATCH] Fix private::exclusive_unwrap_conflict test. Fixes #4689. --- src/libcore/private.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libcore/private.rs b/src/libcore/private.rs index 61f2e013ababc..b0f7d4a82e261 100644 --- a/src/libcore/private.rs +++ b/src/libcore/private.rs @@ -493,7 +493,7 @@ pub mod tests { res.recv(); } - #[test] #[should_fail] #[ignore(reason = "random red")] + #[test] #[should_fail] #[ignore(cfg(windows))] pub fn exclusive_unwrap_conflict() { let x = exclusive(~~"hello"); let x2 = ~mut Some(x.clone()); @@ -505,7 +505,8 @@ pub mod tests { } assert unwrap_exclusive(x) == ~~"hello"; let res = option::swap_unwrap(&mut res); - res.recv(); + // See #4689 for why this can't be just "res.recv()". + assert res.recv() == task::Success; } #[test] #[ignore(cfg(windows))]