Skip to content

Commit

Permalink
print out a fixed number of programs
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jul 2, 2024
1 parent 9e39994 commit 1c14dce
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct Args {
out_dir: Option<PathBuf>,

#[arg(long, default_value = "0")]
generate_fuzzed_programs: u32,
generate_fuzzed_programs: usize,

input_paths: Vec<String>,
}
Expand All @@ -57,9 +57,7 @@ pub fn main() -> anyhow::Result<()> {
}
}

for _ in 0..args.generate_fuzzed_programs {
generate_fuzzed_program();
}
generate_fuzzed_program(&args);

Ok(())
}
Expand All @@ -75,11 +73,12 @@ fn check_input(args: &Args, input_path: &str) -> anyhow::Result<()> {
check_all_crates(&program)
}

fn generate_fuzzed_program() {
fn generate_fuzzed_program(args: &Args) {
use bolero::check;

check!()
.with_type::<Program>()
.with_iterations(args.generate_fuzzed_programs)
.for_each(|p| eprintln!("{p:?}"));
}

Expand Down

0 comments on commit 1c14dce

Please sign in to comment.