From 93c31e7790368ba062da93189c241d996a9ae172 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Thu, 17 Sep 2020 09:39:52 -0400 Subject: [PATCH] Enable some panic tests on Windows --- test-cargo-miri/tests/test.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/test-cargo-miri/tests/test.rs b/test-cargo-miri/tests/test.rs index 68d5426802b..e38dc7a926c 100644 --- a/test-cargo-miri/tests/test.rs +++ b/test-cargo-miri/tests/test.rs @@ -42,22 +42,15 @@ fn num_cpus() { assert_eq!(num_cpus::get(), 1); } - -// FIXME: Remove this `cfg` once we fix https://github.com/rust-lang/miri/issues/1059. -// We cfg-gate the `should_panic` attribute and the `panic!` itself, so that the test -// stdout does not depend on the target. #[test] -#[cfg_attr(not(windows), should_panic(expected="Explicit panic"))] +#[should_panic(expected="Explicit panic")] fn do_panic() { // In large, friendly letters :) - #[cfg(not(windows))] panic!("Explicit panic from test!"); } -// FIXME: see above #[test] #[allow(unconditional_panic)] -#[cfg_attr(not(windows), should_panic(expected="the len is 0 but the index is 42"))] +#[should_panic(expected="the len is 0 but the index is 42")] fn fail_index_check() { - #[cfg(not(windows))] [][42] }