Skip to content

Commit 29ca428

Browse files
committed
Miri is really slow
1 parent c5687e3 commit 29ca428

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/libcore/tests/num/dec2flt/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ fn infinity() {
7777
fn zero() {
7878
test_literal!(0.0);
7979
test_literal!(1e-325);
80+
#[cfg(not(miri))] // Miri is too slow
8081
test_literal!(1e-326);
8182
#[cfg(not(miri))] // Miri is too slow
8283
test_literal!(1e-500);

src/libcore/tests/num/flt2dec/estimator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn test_estimate_scaling_factor() {
4545
#[cfg(not(miri))] // Miri is too slow
4646
let iter = -1074..972;
4747
#[cfg(miri)]
48-
let iter = (-1074..972).step_by(11);
48+
let iter = (-1074..972).step_by(37);
4949

5050
for i in iter {
5151
let expected = super::ldexp_f64(1.0, i).log10().ceil();

src/libcore/tests/num/flt2dec/random.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ fn shortest_random_equivalence_test() {
112112
#[cfg(not(miri))] // Miri is too slow
113113
const N: usize = 10_000;
114114
#[cfg(miri)]
115-
const N: usize = 20;
115+
const N: usize = 10;
116116

117117
f64_random_equivalence_test(format_shortest_opt, fallback, MAX_SIG_DIGITS, N);
118118
f32_random_equivalence_test(format_shortest_opt, fallback, MAX_SIG_DIGITS, N);
@@ -146,7 +146,7 @@ fn exact_f32_random_equivalence_test() {
146146
#[cfg(not(miri))] // Miri is too slow
147147
const N: usize = 1_000;
148148
#[cfg(miri)]
149-
const N: usize = 10;
149+
const N: usize = 3;
150150

151151
for k in 1..21 {
152152
f32_random_equivalence_test(|d, buf| format_exact_opt(d, buf, i16::MIN),
@@ -160,7 +160,7 @@ fn exact_f64_random_equivalence_test() {
160160
#[cfg(not(miri))] // Miri is too slow
161161
const N: usize = 1_000;
162162
#[cfg(miri)]
163-
const N: usize = 5;
163+
const N: usize = 3;
164164

165165
for k in 1..21 {
166166
f64_random_equivalence_test(|d, buf| format_exact_opt(d, buf, i16::MIN),

0 commit comments

Comments
 (0)