Skip to content

Commit

Permalink
feat: Add missing test for Committee::to_next_round()
Browse files Browse the repository at this point in the history
  • Loading branch information
vvp committed Jul 6, 2023
1 parent ff67ccb commit 7a896a6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions node/narwhal/src/helpers/committee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,18 @@ pub mod tests {
}
}

#[proptest]
fn committee_advance(#[filter(CommitteeInput::is_valid)] input: CommitteeInput) {
let committee = input.to_committee().unwrap();
let current_round = input.round;
let current_members = committee.members();
assert_eq!(committee.round(), current_round);

let committee = committee.to_next_round().unwrap();
assert_eq!(committee.round(), current_round + 1);
assert_eq!(committee.members(), current_members);
}

#[proptest]
fn committee_members(input: CommitteeInput) {
let committee = match input.to_committee() {
Expand Down

0 comments on commit 7a896a6

Please sign in to comment.