#[cfg(test)] mod tests { use rand::Rng; #[test] fn gen_rnd() { let rnd_num: f64 = gen_rand(); assert!(rnd_num > 0.); } fn gen_rand() -> f64 { let mut rng = rand::thread_rng(); let random_number: f64 = rng.gen(); random_number } }