diff options
| author | Ralf Jung <post@ralfj.de> | 2019-12-07 12:38:13 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-12-07 12:38:13 +0100 |
| commit | 7ba1232b5ea8f6ab011efe2ce3fb97d955342fdb (patch) | |
| tree | 034ef55e7fabf4da05989eed650176b974863828 /src/libcore/tests/num | |
| parent | 0a953cd9aa8b4c8b821bc672a4408900758e7e63 (diff) | |
libcore: ignore tests in Miri instead of removing them entirely
Diffstat (limited to 'src/libcore/tests/num')
| -rw-r--r-- | src/libcore/tests/num/dec2flt/mod.rs | 4 | ||||
| -rw-r--r-- | src/libcore/tests/num/flt2dec/mod.rs | 2 | ||||
| -rw-r--r-- | src/libcore/tests/num/flt2dec/strategy/dragon.rs | 2 | ||||
| -rw-r--r-- | src/libcore/tests/num/flt2dec/strategy/grisu.rs | 2 |
4 files changed, 4 insertions, 6 deletions
diff --git a/src/libcore/tests/num/dec2flt/mod.rs b/src/libcore/tests/num/dec2flt/mod.rs index 46eacb4200a..361758f859e 100644 --- a/src/libcore/tests/num/dec2flt/mod.rs +++ b/src/libcore/tests/num/dec2flt/mod.rs @@ -53,7 +53,7 @@ fn large() { } #[test] -#[cfg(not(miri))] // Miri is too slow +#[cfg_attr(miri, ignore)] // Miri is too slow fn subnormals() { test_literal!(5e-324); test_literal!(91e-324); @@ -65,7 +65,7 @@ fn subnormals() { } #[test] -#[cfg(not(miri))] // Miri is too slow +#[cfg_attr(miri, ignore)] // Miri is too slow fn infinity() { test_literal!(1e400); test_literal!(1e309); diff --git a/src/libcore/tests/num/flt2dec/mod.rs b/src/libcore/tests/num/flt2dec/mod.rs index f85369ce40b..2f94ea2fc4b 100644 --- a/src/libcore/tests/num/flt2dec/mod.rs +++ b/src/libcore/tests/num/flt2dec/mod.rs @@ -256,7 +256,6 @@ pub fn f32_shortest_sanity_test<F>(mut f: F) where F: FnMut(&Decoded, &mut [u8]) check_shortest!(f(minf32) => b"1", -44); } -#[cfg(not(miri))] // Miri is too slow pub fn f32_exact_sanity_test<F>(mut f: F) where F: FnMut(&Decoded, &mut [u8], i16) -> (usize, i16) { let minf32 = ldexp_f32(1.0, -149); @@ -362,7 +361,6 @@ pub fn f64_shortest_sanity_test<F>(mut f: F) where F: FnMut(&Decoded, &mut [u8]) check_shortest!(f(minf64) => b"5", -323); } -#[cfg(not(miri))] // Miri is too slow pub fn f64_exact_sanity_test<F>(mut f: F) where F: FnMut(&Decoded, &mut [u8], i16) -> (usize, i16) { let minf64 = ldexp_f64(1.0, -1074); diff --git a/src/libcore/tests/num/flt2dec/strategy/dragon.rs b/src/libcore/tests/num/flt2dec/strategy/dragon.rs index 0c545b4d887..3d985c6796b 100644 --- a/src/libcore/tests/num/flt2dec/strategy/dragon.rs +++ b/src/libcore/tests/num/flt2dec/strategy/dragon.rs @@ -22,7 +22,7 @@ fn shortest_sanity_test() { } #[test] -#[cfg(not(miri))] // Miri is too slow +#[cfg_attr(miri, ignore)] // Miri is too slow fn exact_sanity_test() { // This test ends up running what I can only assume is some corner-ish case // of the `exp2` library function, defined in whatever C runtime we're diff --git a/src/libcore/tests/num/flt2dec/strategy/grisu.rs b/src/libcore/tests/num/flt2dec/strategy/grisu.rs index f8bdddfe2e4..a2c7f1b0e83 100644 --- a/src/libcore/tests/num/flt2dec/strategy/grisu.rs +++ b/src/libcore/tests/num/flt2dec/strategy/grisu.rs @@ -36,7 +36,7 @@ fn shortest_sanity_test() { } #[test] -#[cfg(not(miri))] // Miri is too slow +#[cfg_attr(miri, ignore)] // Miri is too slow fn exact_sanity_test() { // See comments in dragon.rs's exact_sanity_test for why this test is // ignored on MSVC |
