Skip to content

Commit

Permalink
add test to and from payload for EvmConfigParams
Browse files Browse the repository at this point in the history
  • Loading branch information
saibatizoku committed Oct 12, 2021
1 parent 3d5decb commit ec95c0f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions chain-impl-mockchain/src/config.rs
Expand Up @@ -1061,6 +1061,15 @@ mod test {
use quickcheck::{Arbitrary, Gen};
use strum::IntoEnumIterator;

#[cfg(feature = "evm")]
#[test]
fn to_and_from_payload_evm_config_params() {
let evm_params = EvmConfigParams::default();
let payload = evm_params.to_payload();
let other_evm = EvmConfigParams::from_payload(&payload).unwrap();
assert_eq!(evm_params, other_evm);
}

quickcheck! {
fn tag_len_computation_correct(tag: Tag, len: usize) -> TestResult {
let len = len % MAXIMUM_LEN;
Expand Down

0 comments on commit ec95c0f

Please sign in to comment.