From cc8164476d306dad75554a85c16aaecdd6399d80 Mon Sep 17 00:00:00 2001 From: Tae Gyun Kim Date: Mon, 10 Jun 2024 13:23:19 -0400 Subject: [PATCH] use different default ranges for miri --- profiling/src/internal/profile/fuzz_tests.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/profiling/src/internal/profile/fuzz_tests.rs b/profiling/src/internal/profile/fuzz_tests.rs index b872063f7..e6a117ed9 100644 --- a/profiling/src/internal/profile/fuzz_tests.rs +++ b/profiling/src/internal/profile/fuzz_tests.rs @@ -450,11 +450,20 @@ fn fuzz_failure_001() { /// Fuzzes adding a bunch of samples to the profile. #[test] fn test_fuzz_add_sample() { + #[cfg(miri)] + let sample_types_gen = Vec::::gen().with().len(0..=8usize); + #[cfg(not(miri))] + let sample_types_gen = Vec::::gen(); + + #[cfg(miri)] + let samples_gen = Vec::<(Option, Sample)>::gen() + .with() + .len(0..=8usize); + #[cfg(not(miri))] + let samples_gen = Vec::<(Option, Sample)>::gen(); + bolero::check!() - .with_generator(( - Vec::::gen(), - Vec::<(Option, Sample)>::gen(), - )) + .with_generator((sample_types_gen, samples_gen)) .for_each(|(expected_sample_types, samples)| { let sample_types: Vec<_> = expected_sample_types .iter()