diff --git a/Cargo.toml b/Cargo.toml index 9021207..090d7f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,7 @@ edition = "2021" [features] default = ["fft_resampler"] fft_resampler = ["realfft", "num-complex"] +log = ["dep:log"] [dependencies] log = { version = "0.4.18", optional = true } @@ -31,6 +32,7 @@ rand = "0.8.5" num-traits = "0.2.15" log = "0.4.18" approx = "0.5.1" +test-log = "0.2.16" [[bench]] name = "resamplers" diff --git a/src/asynchro_fast.rs b/src/asynchro_fast.rs index e59f89e..387f8d7 100644 --- a/src/asynchro_fast.rs +++ b/src/asynchro_fast.rs @@ -816,6 +816,7 @@ mod tests { use crate::{check_output, check_ratio}; use crate::{FastFixedIn, FastFixedOut}; use rand::Rng; + use test_log::test; #[test] fn make_resampler_fi() { diff --git a/src/asynchro_sinc.rs b/src/asynchro_sinc.rs index 1a56092..0b3ba7e 100644 --- a/src/asynchro_sinc.rs +++ b/src/asynchro_sinc.rs @@ -872,6 +872,7 @@ mod tests { use crate::{check_output, check_ratio}; use crate::{SincFixedIn, SincFixedOut}; use rand::Rng; + use test_log::test; fn basic_params() -> SincInterpolationParameters { SincInterpolationParameters { diff --git a/src/interpolation.rs b/src/interpolation.rs index a5e5e92..a1bf51c 100644 --- a/src/interpolation.rs +++ b/src/interpolation.rs @@ -68,6 +68,7 @@ mod tests { use crate::interpolation::get_nearest_times_2; use crate::interpolation::get_nearest_times_3; use crate::interpolation::get_nearest_times_4; + use test_log::test; #[test] fn get_nearest_2() { diff --git a/src/lib.rs b/src/lib.rs index a4ee343..092d2de 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -703,6 +703,7 @@ pub mod tests { use crate::{FastFixedIn, PolynomialDegree, SincFixedIn, SincFixedOut}; #[cfg(feature = "fft_resampler")] use crate::{FftFixedIn, FftFixedInOut, FftFixedOut}; + use test_log::test; // This tests that a VecResampler can be boxed. #[test] diff --git a/src/sinc.rs b/src/sinc.rs index 32cf2b5..3ce64f1 100644 --- a/src/sinc.rs +++ b/src/sinc.rs @@ -53,6 +53,7 @@ where mod tests { use crate::sinc::make_sincs; use crate::WindowFunction; + use test_log::test; #[test] fn sincs() { diff --git a/src/sinc_interpolator/mod.rs b/src/sinc_interpolator/mod.rs index 7a689c8..234979e 100644 --- a/src/sinc_interpolator/mod.rs +++ b/src/sinc_interpolator/mod.rs @@ -160,6 +160,7 @@ mod tests { use crate::WindowFunction; use num_traits::Float; use rand::Rng; + use test_log::test; fn get_sinc_interpolated(wave: &[T], index: usize, sinc: &[T]) -> T { let wave_cut = &wave[index..(index + sinc.len())]; diff --git a/src/sinc_interpolator/sinc_interpolator_avx.rs b/src/sinc_interpolator/sinc_interpolator_avx.rs index ba590a8..1017ca2 100644 --- a/src/sinc_interpolator/sinc_interpolator_avx.rs +++ b/src/sinc_interpolator/sinc_interpolator_avx.rs @@ -219,6 +219,7 @@ mod tests { use crate::WindowFunction; use num_traits::Float; use rand::Rng; + use test_log::test; fn get_sinc_interpolated(wave: &[T], index: usize, sinc: &[T]) -> T { let wave_cut = &wave[index..(index + sinc.len())]; diff --git a/src/sinc_interpolator/sinc_interpolator_neon.rs b/src/sinc_interpolator/sinc_interpolator_neon.rs index 2162c97..02cf84c 100644 --- a/src/sinc_interpolator/sinc_interpolator_neon.rs +++ b/src/sinc_interpolator/sinc_interpolator_neon.rs @@ -223,6 +223,7 @@ mod tests { use crate::WindowFunction; use num_traits::Float; use rand::Rng; + use test_log::test; fn get_sinc_interpolated(wave: &[T], index: usize, sinc: &[T]) -> T { let wave_cut = &wave[index..(index + sinc.len())]; diff --git a/src/sinc_interpolator/sinc_interpolator_sse.rs b/src/sinc_interpolator/sinc_interpolator_sse.rs index a472d3a..a1b8de0 100644 --- a/src/sinc_interpolator/sinc_interpolator_sse.rs +++ b/src/sinc_interpolator/sinc_interpolator_sse.rs @@ -231,6 +231,7 @@ mod tests { use crate::WindowFunction; use num_traits::Float; use rand::Rng; + use test_log::test; fn get_sinc_interpolated(wave: &[T], index: usize, sinc: &[T]) -> T { let wave_cut = &wave[index..(index + sinc.len())]; diff --git a/src/synchro.rs b/src/synchro.rs index ea0df45..469e546 100644 --- a/src/synchro.rs +++ b/src/synchro.rs @@ -687,6 +687,7 @@ mod tests { use crate::synchro::{FftFixedIn, FftFixedInOut, FftFixedOut, FftResampler}; use crate::Resampler; use rand::Rng; + use test_log::test; #[test] fn resample_unit() { diff --git a/src/windows.rs b/src/windows.rs index 508f47a..e6b85d1 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -157,6 +157,7 @@ mod tests { use crate::windows::make_window; use crate::windows::WindowFunction; use approx::assert_abs_diff_eq; + use test_log::test; #[test] fn test_blackman_harris() {