-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split the unit tests into several files.
- Loading branch information
1 parent
6494f3c
commit 865a2e8
Showing
4 changed files
with
22 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use super::Histogram; | ||
|
||
#[cfg(test)] | ||
pub fn histo64(lowest_discernible_value: u64, highest_trackable_value: u64, num_significant_digits: u8) | ||
-> Histogram<u64> { | ||
Histogram::<u64>::new_with_bounds(lowest_discernible_value, highest_trackable_value, | ||
num_significant_digits).unwrap() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use super::Histogram; | ||
|
||
#[path = "helpers.rs"] | ||
mod helpers; | ||
#[path = "init.rs"] | ||
mod init; | ||
|
||
#[test] | ||
fn new_err_high_not_double_low() { | ||
let res = Histogram::<u64>::new_with_bounds(10, 15, 0); | ||
assert_eq!("highest trackable value must be >= 2 * lowest discernible value", res.unwrap_err()); | ||
} |