Skip to content

Commit 392d745

Browse files
committed
Auto merge of #1089 - RalfJung:should-panic, r=RalfJung
test should_panic checking the panic string
2 parents e1b639a + 6363bc4 commit 392d745

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test-cargo-miri/tests/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn simple2() {
1212
assert_ne!(42, 24);
1313
}
1414

15-
// A test that won't work on miri (tests disabling tests)
15+
// A test that won't work on miri (tests disabling tests).
1616
#[cfg(not(miri))]
1717
#[test]
1818
fn does_not_work_on_miri() {
@@ -45,9 +45,9 @@ fn num_cpus() {
4545

4646
// FIXME: Remove this `cfg` once we fix https://github.com/rust-lang/miri/issues/1059
4747
// We cfg-gate the `should_panic` attribute and the `panic!` itself, so that the test
48-
// stdout does not depend on the platform
48+
// stdout does not depend on the platform.
4949
#[test]
50-
#[cfg_attr(not(windows), should_panic)]
50+
#[cfg_attr(not(windows), should_panic(expected="Explicit panic"))]
5151
fn do_panic() { // In large, friendly letters :)
5252
#[cfg(not(windows))]
5353
panic!("Explicit panic from test!");

0 commit comments

Comments
 (0)