about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-03-20 19:17:33 -0400
committerGitHub <noreply@github.com>2022-03-20 16:17:33 -0700
commit35e16a1e0652a0c2f351be8a23c18514bdd35f34 (patch)
treebf060c9fecf6704d52194e6fb44af2c230507e24
parent72df4c45056a8bc0d1b3f06fdc828722177f0763 (diff)
downloadrust-35e16a1e0652a0c2f351be8a23c18514bdd35f34.tar.gz
rust-35e16a1e0652a0c2f351be8a23c18514bdd35f34.zip
rust-lang/portable-simd#266: reduce Miri test count in round.rs
-rw-r--r--crates/core_simd/tests/round.rs2
-rw-r--r--crates/test_helpers/src/lib.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/core_simd/tests/round.rs b/crates/core_simd/tests/round.rs
index 7feb0320a16..484fd5bf47d 100644
--- a/crates/core_simd/tests/round.rs
+++ b/crates/core_simd/tests/round.rs
@@ -59,7 +59,7 @@ macro_rules! float_rounding_test {
                     const MAX_REPRESENTABLE_VALUE: Scalar =
                         (ALL_MANTISSA_BITS << (core::mem::size_of::<Scalar>() * 8 - <Scalar>::MANTISSA_DIGITS as usize - 1)) as Scalar;
 
-                    let mut runner = proptest::test_runner::TestRunner::default();
+                    let mut runner = test_helpers::make_runner();
                     runner.run(
                         &test_helpers::array::UniformArrayStrategy::new(-MAX_REPRESENTABLE_VALUE..MAX_REPRESENTABLE_VALUE),
                         |x| {
diff --git a/crates/test_helpers/src/lib.rs b/crates/test_helpers/src/lib.rs
index 8bf7f5ed3d2..141bee18a9a 100644
--- a/crates/test_helpers/src/lib.rs
+++ b/crates/test_helpers/src/lib.rs
@@ -78,11 +78,11 @@ impl<T: core::fmt::Debug + DefaultStrategy, const LANES: usize> DefaultStrategy
 }
 
 #[cfg(not(miri))]
-fn make_runner() -> proptest::test_runner::TestRunner {
+pub fn make_runner() -> proptest::test_runner::TestRunner {
     Default::default()
 }
 #[cfg(miri)]
-fn make_runner() -> proptest::test_runner::TestRunner {
+pub fn make_runner() -> proptest::test_runner::TestRunner {
     // Only run a few tests on Miri
     proptest::test_runner::TestRunner::new(proptest::test_runner::Config::with_cases(4))
 }