add asserts in spec::authority_round's unit test
This commit is contained in:
parent
a0dd77ca01
commit
c0a8eaa3bf
@ -62,7 +62,10 @@ pub struct AuthorityRound {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use uint::Uint;
|
use uint::Uint;
|
||||||
use util::U256;
|
use util::U256;
|
||||||
|
use util::H160;
|
||||||
use serde_json;
|
use serde_json;
|
||||||
|
use hash::Address;
|
||||||
|
use spec::validator_set::ValidatorSet;
|
||||||
use spec::authority_round::AuthorityRound;
|
use spec::authority_round::AuthorityRound;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -84,5 +87,10 @@ mod tests {
|
|||||||
let deserialized: AuthorityRound = serde_json::from_str(s).unwrap();
|
let deserialized: AuthorityRound = serde_json::from_str(s).unwrap();
|
||||||
assert_eq!(deserialized.params.gas_limit_bound_divisor, Uint(U256::from(0x0400)));
|
assert_eq!(deserialized.params.gas_limit_bound_divisor, Uint(U256::from(0x0400)));
|
||||||
assert_eq!(deserialized.params.step_duration, Uint(U256::from(0x02)));
|
assert_eq!(deserialized.params.step_duration, Uint(U256::from(0x02)));
|
||||||
|
assert_eq!(deserialized.params.validators, ValidatorSet::List(vec![Address(H160::from("0xc6d9d2cd449a754c494264e1809c50e34d64562b"))]));
|
||||||
|
assert_eq!(deserialized.params.block_reward, Some(Uint(U256::from(0x50))));
|
||||||
|
assert!(deserialized.params.registrar.is_none());
|
||||||
|
assert_eq!(deserialized.params.start_step, Some(Uint(U256::from(24))));
|
||||||
|
assert_eq!(deserialized.params.eip155_transition, Some(Uint(U256::from(0x42))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user