Skip to content

Commit e10a26f

Browse files
committed
add a test for excluding tests on miri
1 parent 11433bf commit e10a26f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test-cargo-miri/tests/foo.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@ fn bar() {
99
fn baz() {
1010
assert_eq!(5, 5);
1111
}
12+
13+
// A test that won't work on miri
14+
#[cfg(not(feature = "cargo-miri"))]
15+
#[test]
16+
fn does_not_work_on_miri() {
17+
let x = 0u8;
18+
assert!(&x as *const _ as usize % 4 < 4);
19+
}

0 commit comments

Comments
 (0)