separate mod for tests

This commit is contained in:
NikVolf 2016-09-29 13:39:13 +03:00
parent b477ca17fe
commit 59c0551ff4

View File

@ -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);
} }
}