Skip to content

Commit

Permalink
use different default ranges for miri
Browse files Browse the repository at this point in the history
  • Loading branch information
taegyunkim committed Jun 10, 2024
1 parent 7de94c0 commit 288ff5c
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions profiling/src/internal/profile/fuzz_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<owned_types::ValueType>::gen().with().len(0..=8usize);
#[cfg(not(miri))]
let sample_types_gen = Vec::<owned_types::ValueType>::gen();

#[cfg(miri)]
let samples_gen = Vec::<(Option<Timestamp>, Sample)>::gen()
.with()
.len(0..=8usize);
#[cfg(not(miri))]
let samples_gen = Vec::<(Option<Timestamp>, Sample)>::gen();

bolero::check!()
.with_generator((
Vec::<owned_types::ValueType>::gen(),
Vec::<(Option<Timestamp>, Sample)>::gen(),
))
.with_generator((sample_types_gen, samples_gen))
.for_each(|(expected_sample_types, samples)| {
let sample_types: Vec<_> = expected_sample_types
.iter()
Expand Down

0 comments on commit 288ff5c

Please sign in to comment.