From 6363bc497529dbce3000ec213a8023112eebd512 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 30 Nov 2019 10:31:53 +0100 Subject: [PATCH] test should_panic checking the panic string --- test-cargo-miri/tests/test.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test-cargo-miri/tests/test.rs b/test-cargo-miri/tests/test.rs index 5d1beaec9806..ce85f929049b 100644 --- a/test-cargo-miri/tests/test.rs +++ b/test-cargo-miri/tests/test.rs @@ -12,7 +12,7 @@ fn simple2() { assert_ne!(42, 24); } -// A test that won't work on miri (tests disabling tests) +// A test that won't work on miri (tests disabling tests). #[cfg(not(miri))] #[test] fn does_not_work_on_miri() { @@ -45,9 +45,9 @@ fn num_cpus() { // 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 platform +// stdout does not depend on the platform. #[test] -#[cfg_attr(not(windows), should_panic)] +#[cfg_attr(not(windows), should_panic(expected="Explicit panic"))] fn do_panic() { // In large, friendly letters :) #[cfg(not(windows))] panic!("Explicit panic from test!");