Skip to content

Commit

Permalink
Update node/narwhal/committee/src/prop_tests.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Niklas Long <[email protected]>
Signed-off-by: Vesa-Ville <[email protected]>
  • Loading branch information
vvp and niklaslong committed Jul 17, 2023
1 parent 64a766a commit 3153f13
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions node/narwhal/committee/src/prop_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,10 @@ fn invalid_stakes(#[strategy(too_low_stake_committee())] committee: Result<Commi

#[proptest]
fn invalid_member_count(#[strategy(too_small_committee())] committee: Result<Committee<CurrentNetwork>>) {
assert!(committee.is_err());
if let Err(err) = committee {
assert_eq!(err.to_string().as_str(), "Committee must have at least 4 members");
}
assert!(matches!(committee, Err(e) if e.to_string().as_str() == "Committee must have at least 4 members"))
}

#[proptest]
fn invalid_round(#[strategy(invalid_round_committee())] committee: Result<Committee<CurrentNetwork>>) {
assert!(committee.is_err());
if let Err(err) = committee {
assert_eq!(err.to_string().as_str(), "Round must be nonzero");
}
assert!(matches!(committee, Err(e) if e.to_string().as_str() == "Round must be nonzero"))
}

0 comments on commit 3153f13

Please sign in to comment.