diff --git a/crates/forge/tests/it/zk/fuzz.rs b/crates/forge/tests/it/zk/fuzz.rs new file mode 100644 index 000000000..e75dcb9ff --- /dev/null +++ b/crates/forge/tests/it/zk/fuzz.rs @@ -0,0 +1,13 @@ +//! Fuzz tests. + +use crate::{config::*, test_helpers::TEST_DATA_DEFAULT}; +use forge::revm::primitives::SpecId; +use foundry_test_utils::Filter; + +#[tokio::test(flavor = "multi_thread")] +async fn test_zk_fuzz_avoid_system_addresses() { + let runner = TEST_DATA_DEFAULT.runner_zksync(); + let filter = Filter::new("testZkFuzzAvoidSystemAddresses", "ZkFuzzTest", ".*"); + + TestConfig::with_filter(runner, filter).evm_spec(SpecId::SHANGHAI).run().await; +} diff --git a/crates/forge/tests/it/zk/mod.rs b/crates/forge/tests/it/zk/mod.rs index a0cec8fcf..bd76b99d9 100644 --- a/crates/forge/tests/it/zk/mod.rs +++ b/crates/forge/tests/it/zk/mod.rs @@ -2,5 +2,6 @@ mod basic; mod cheats; mod contracts; +mod fuzz; mod logs; mod repros; diff --git a/testdata/zk/Fuzz.t.sol b/testdata/zk/Fuzz.t.sol new file mode 100644 index 000000000..2242d5b07 --- /dev/null +++ b/testdata/zk/Fuzz.t.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import "ds-test/test.sol"; + +contract ZkFuzzTest is DSTest { + function testZkFuzzAvoidSystemAddresses(address addr) public pure { + assert(addr > address(65535)); + } +}