separate mod for tests
This commit is contained in:
parent
b477ca17fe
commit
59c0551ff4
@ -209,6 +209,11 @@ pub struct BloomJournal {
|
|||||||
pub entries: Vec<(usize, u64)>,
|
pub entries: Vec<(usize, u64)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::Bloom;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn bloom_test_set() {
|
fn bloom_test_set() {
|
||||||
let mut bloom = Bloom::new(10, 80);
|
let mut bloom = Bloom::new(10, 80);
|
||||||
@ -238,3 +243,4 @@ fn bloom_howfull() {
|
|||||||
// 2/8/64 = 0.00390625
|
// 2/8/64 = 0.00390625
|
||||||
assert!(full >= 0.0039f64 && full <= 0.004f64);
|
assert!(full >= 0.0039f64 && full <= 0.004f64);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user