From b4aaae958a72c567ae2d8046f6ba03b07d7a1962 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Wed, 20 Jul 2022 22:04:34 +0200 Subject: [PATCH] test fix --- src/tests/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tests/mod.rs b/src/tests/mod.rs index 92d0df4..f43204b 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -24,7 +24,7 @@ SOFTWARE. //! Test module for "integration"-like tests. No small unit tests of simple functions. use crate::error::SpectrumAnalyzerError; -use crate::scaling::{divide_by_N, divide_by_N_sqrt, scale_to_zero_to_one}; +use crate::scaling::{divide_by_N, scale_to_zero_to_one}; use crate::tests::sine::sine_wave_audio_data_multiple; use crate::windows::{hamming_window, hann_window}; use crate::{samples_fft_to_spectrum, FrequencyLimit}; @@ -162,7 +162,7 @@ fn test_spectrum_power() { short_window, 44100, FrequencyLimit::Max(4000.0), - Some(÷_by_N_sqrt), + Some(÷_by_N), ) .unwrap(); @@ -170,7 +170,7 @@ fn test_spectrum_power() { long_window, 44100, FrequencyLimit::Max(4000.0), - Some(÷_by_N_sqrt), + Some(÷_by_N), ) .unwrap(); @@ -203,7 +203,7 @@ fn test_spectrum_power() { let ab_deviation = ab_abs_diff / max(a, b).val(); //let ac_deviation = ac_abs_diff / max(a, c).val(); assert!( - ab_deviation < 0.07, + ab_deviation < 0.122, "Values must more or less equal, because both were divided by their N. deviation={}", ab_deviation );