diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/parsing/mod.rs | 2 | ||||
-rw-r--r-- | src/utils.rs | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/parsing/mod.rs b/src/parsing/mod.rs index 3aedb2c..4454b04 100644 --- a/src/parsing/mod.rs +++ b/src/parsing/mod.rs | |||
@@ -2,3 +2,5 @@ | |||
2 | pub mod equalizer_apo; | 2 | pub mod equalizer_apo; |
3 | 3 | ||
4 | pub use self::equalizer_apo::MainParser as EqualizerApoParser; | 4 | pub use self::equalizer_apo::MainParser as EqualizerApoParser; |
5 | |||
6 | // TODO: test parsing filters with real examples | ||
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 | } | ||