@@ -11,6 +11,7 @@ use foundry_common::{
1111 contracts:: { ContractsByAddress , ContractsByArtifact } ,
1212 TestFunctionExt ,
1313} ;
14+ use foundry_config:: FuzzConfig ;
1415use foundry_evm:: {
1516 decode:: decode_console_logs,
1617 executor:: { CallResult , DeployResult , EvmError , ExecutionErr , Executor } ,
@@ -286,6 +287,7 @@ impl<'a> ContractRunner<'a> {
286287 * should_fail,
287288 test_options. fuzzer ( ) ,
288289 setup. clone ( ) ,
290+ test_options. fuzz . clone ( ) ,
289291 )
290292 } else {
291293 self . clone ( ) . run_test ( func, * should_fail, setup. clone ( ) )
@@ -530,15 +532,15 @@ impl<'a> ContractRunner<'a> {
530532 should_fail : bool ,
531533 runner : TestRunner ,
532534 setup : TestSetup ,
535+ fuzz_config : FuzzConfig ,
533536 ) -> Result < TestResult > {
534537 let TestSetup { address, mut logs, mut traces, mut labeled_addresses, .. } = setup;
535538
536539 // Run fuzz test
537540 let start = Instant :: now ( ) ;
538- let mut result =
539- FuzzedExecutor :: new ( & self . executor , runner, self . sender , Default :: default ( ) )
540- . fuzz ( func, address, should_fail, self . errors )
541- . wrap_err ( "Failed to run fuzz test" ) ?;
541+ let mut result = FuzzedExecutor :: new ( & self . executor , runner, self . sender , fuzz_config)
542+ . fuzz ( func, address, should_fail, self . errors )
543+ . wrap_err ( "Failed to run fuzz test" ) ?;
542544
543545 let kind = TestKind :: Fuzz {
544546 median_gas : result. median_gas ( false ) ,
0 commit comments