Skip to content

Commit

Permalink
test: add cast proof test (#6403)
Browse files Browse the repository at this point in the history
* test: add test for cast proof

* add additional cases
  • Loading branch information
mattsse authored Nov 22, 2023
1 parent 56ad18d commit 7fcb730
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions crates/cast/bin/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,35 @@ 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",
"0x1",
"0x01",
]);
match args.sub {
Subcommands::Proof { slots, .. } => {
assert_eq!(
slots,
vec![
B256::ZERO,
U256::from(1).into(),
B256::ZERO,
U256::from(1).into(),
U256::from(1).into()
]
);
}
_ => unreachable!(),
};
}

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

0 comments on commit 7fcb730

Please sign in to comment.