diff --git a/crates/format/src/case.rs b/crates/format/src/case.rs index 0013ac6..6b2f107 100644 --- a/crates/format/src/case.rs +++ b/crates/format/src/case.rs @@ -16,12 +16,6 @@ pub struct Case { pub expected: Option, } -define_wrapper_type!( - /// A wrapper type for the index of test cases found in metadata file. - #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] - CaseIdx(usize); -); - impl Case { pub fn inputs_iterator(&self) -> impl Iterator { let inputs_len = self.inputs.len(); @@ -39,3 +33,9 @@ impl Case { }) } } + +define_wrapper_type!( + /// A wrapper type for the index of test cases found in metadata file. + #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] + CaseIdx(usize); +); diff --git a/crates/format/src/input.rs b/crates/format/src/input.rs index 6d49e74..689ca23 100644 --- a/crates/format/src/input.rs +++ b/crates/format/src/input.rs @@ -462,7 +462,7 @@ mod tests { } #[test] - fn test_encoded_input_address() { + fn test_encoded_input_address_with_signature() { let raw_abi = r#"[ { "inputs": [{"name": "recipient", "type": "address"}], @@ -483,8 +483,8 @@ mod tests { .0; let input: Input = Input { - instance: ContractInstance::new_from("Contract"), - method: Method::FunctionName("send".to_owned()), + instance: "Contract".to_owned().into(), + method: Method::FunctionName("send(address)".to_owned()), calldata: Calldata::Compound(vec![ "0x1000000000000000000000000000000000000001".to_string(), ]), @@ -509,7 +509,7 @@ mod tests { } #[test] - fn test_encoded_input_address_with_signature() { + fn test_encoded_input_address() { let raw_abi = r#"[ { "inputs": [{"name": "recipient", "type": "address"}], @@ -531,7 +531,7 @@ mod tests { let input: Input = Input { instance: ContractInstance::new_from("Contract"), - method: Method::FunctionName("send(address)".to_owned()), + method: Method::FunctionName("send".to_owned()), calldata: Calldata::Compound(vec![ "0x1000000000000000000000000000000000000001".to_string(), ]),