diff --git a/src/decoder/symphonia.rs b/src/decoder/symphonia.rs index 31577cef..57054455 100644 --- a/src/decoder/symphonia.rs +++ b/src/decoder/symphonia.rs @@ -341,48 +341,3 @@ impl Iterator for SymphoniaDecoder { Some(sample) } } - -#[cfg(test)] -mod tests { - use std::time::Duration; - - use symphonia::core::units::Time; - - use crate::decoder::symphonia::time_to_duration; - - #[test] - fn test_time_to_dur_zero_frac() { - let time = Time { - seconds: 7, - frac: 0.0, - }; - let duration = Duration::new( - time.seconds, - if time.frac > 0.0 { - (1f64 / time.frac) as u32 - } else { - 0 - }, - ); - - assert_eq!(time_to_duration(time), duration); - } - - #[test] - fn test_time_to_dur_non_zero_frac() { - let time = Time { - seconds: 7, - frac: 0.3, - }; - let duration = Duration::new( - time.seconds, - if time.frac > 0.0 { - (1f64 / time.frac) as u32 - } else { - 0 - }, - ); - - assert_eq!(time_to_duration(time), duration); - } -}