Skip to content

also reduce Miri test count in round.rs #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/core_simd/tests/round.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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| {
Expand Down
4 changes: 2 additions & 2 deletions crates/test_helpers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down