Skip to content

Commit

Permalink
test: add test for cast proof
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Nov 22, 2023
1 parent 266e107 commit 735bc30
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions crates/cast/bin/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,24 @@ mod tests {
use cast::SimpleCast;
use ethers_core::types::BlockNumber;

#[test]
fn parse_proof_slot() {
let args: Opts = Opts::parse_from([
"foundry-cli",
"proof",
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"0",
"1",
"0x0000000000000000000000000000000000000000000000000000000000000000",
]);
match args.sub {
Subcommands::Proof { slots, .. } => {
assert_eq!(slots, vec![B256::ZERO, U256::from(1).into(), B256::ZERO]);
}
_ => unreachable!(),
};
}

#[test]
fn parse_call_data() {
let args: Opts = Opts::parse_from([
Expand Down

0 comments on commit 735bc30

Please sign in to comment.