diff options
Diffstat (limited to 'src/utils.rs')
-rw-r--r-- | src/utils.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/utils.rs b/src/utils.rs index 24df0ce..b966a3b 100644 --- a/src/utils.rs +++ b/src/utils.rs | |||
@@ -85,3 +85,16 @@ fn introspect(conn: &dbus::ConnPath<&Connection>) { | |||
85 | println!("{}", thing.iter_init().read::<String>().unwrap()); | 85 | println!("{}", thing.iter_init().read::<String>().unwrap()); |
86 | } | 86 | } |
87 | */ | 87 | */ |
88 | |||
89 | #[cfg(test)] | ||
90 | mod tests { | ||
91 | |||
92 | #[test] | ||
93 | fn decibel_to_ratio() { | ||
94 | assert_eq!(super::decibel_to_ratio(0f64), 1f64); | ||
95 | assert_eq!(super::decibel_to_ratio(20f64), 10f64); | ||
96 | assert_eq!(super::decibel_to_ratio(40f64), 100f64); | ||
97 | assert_eq!(super::decibel_to_ratio(60f64), 1000f64); | ||
98 | } | ||
99 | |||
100 | } | ||