Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into dp/chore/extricate-state-backend
Browse files Browse the repository at this point in the history
* master:
  Extract AccountDB to account-db (#10839)
  test: Update Whisper test for invalid pool size (#10811)
  • Loading branch information
dvdplm committed Jul 4, 2019
2 parents 9553c8c + fafb534 commit 9b60a57
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions whisper/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,21 @@ mod tests {
}

#[test]
// The Whisper pool size is of type usize. Invalid Whisper pool sizes include
// values below 0 and either above 2 ** 64 - 1 on a 64-bit processor or
// above 2 ** 32 - 1 on a 32-bit processor.
fn invalid_whisper_pool_size() {
let command = vec!["whisper", "--whisper-pool-size=-100000000000000000000000000000000000000"]
let command_pool_size_too_low = vec!["whisper", "--whisper-pool-size=-1"]
.into_iter()
.map(Into::into)
.collect::<Vec<String>>();

assert!(execute(command).is_err());
let command_pool_size_too_high = vec!["whisper", "--whisper-pool-size=18446744073709552000"]
.into_iter()
.map(Into::into)
.collect::<Vec<String>>();

assert!(execute(command_pool_size_too_low).is_err());
assert!(execute(command_pool_size_too_high).is_err());
}
}

0 comments on commit 9b60a57

Please sign in to comment.