Skip to content

Commit

Permalink
Remove commented out code
Browse files Browse the repository at this point in the history
There's no way to get the length of a `Mapping` so it doesn't make sense
to check this in tests anymore
  • Loading branch information
HCastano committed Dec 10, 2021
1 parent c191a3f commit a70a350
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions examples/multisig/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,6 @@ mod multisig {
let transaction = contract.transactions.get(0).unwrap();
assert_eq!(transaction, Transaction::change_requirement(1));
contract.confirmations.get(&(0, accounts.alice)).unwrap();
// assert_eq!(contract.confirmations.len(), 1);
assert_eq!(contract.confirmation_count.get(&0).unwrap(), 1);
contract
}
Expand All @@ -770,8 +769,6 @@ mod multisig {
assert!(contract.is_owner.get(&accounts.charlie).is_none());
assert!(contract.is_owner.get(&accounts.django).is_none());
assert!(contract.is_owner.get(&accounts.frank).is_none());
// assert_eq!(contract.confirmations.len(), 0);
// assert_eq!(contract.confirmation_count.len(), 0);
assert_eq!(contract.transaction_list.transactions.len(), 0);
}

Expand Down Expand Up @@ -975,7 +972,6 @@ mod multisig {
contract.confirm_transaction(0);
assert_eq!(test::recorded_events().count(), 3);
contract.confirmations.get(&(0, accounts.bob)).unwrap();
// assert_eq!(contract.confirmations.len(), 2);
assert_eq!(contract.confirmation_count.get(&0).unwrap(), 2);
}

Expand All @@ -990,7 +986,6 @@ mod multisig {
// Confirm by Eve
set_sender(accounts.eve);
contract.confirm_transaction(0);
// assert_eq!(contract.confirmations.len(), 3);
assert_eq!(contract.confirmation_count.get(&0).unwrap(), 3);
// Revoke from Eve
contract.revoke_confirmation(0);
Expand All @@ -1009,7 +1004,6 @@ mod multisig {
contract.confirm_transaction(0);
assert_eq!(test::recorded_events().count(), 2);
contract.confirmations.get(&(0, accounts.alice)).unwrap();
// assert_eq!(contract.confirmations.len(), 1);
assert_eq!(contract.confirmation_count.get(&0).unwrap(), 1);
}

Expand All @@ -1029,7 +1023,6 @@ mod multisig {
contract.revoke_confirmation(0);
assert_eq!(test::recorded_events().count(), 3);
assert!(contract.confirmations.get(&(0, accounts.alice)).is_none());
// assert_eq!(contract.confirmations.len(), 0);
assert_eq!(contract.confirmation_count.get(&0).unwrap(), 0);
}

Expand All @@ -1041,7 +1034,6 @@ mod multisig {
contract.revoke_confirmation(0);
assert_eq!(test::recorded_events().count(), 2);
assert!(contract.confirmations.get(&(0, accounts.alice)).is_some());
// assert_eq!(contract.confirmations.len(), 1);
assert_eq!(contract.confirmation_count.get(&0).unwrap(), 1);
}

Expand Down

0 comments on commit a70a350

Please sign in to comment.