From 01d644ae426ffd2452f425ce1a80234c551949b5 Mon Sep 17 00:00:00 2001 From: jatinchowdhury18 Date: Fri, 13 Oct 2023 00:37:49 -0700 Subject: [PATCH] Add missing margins for Gain Test (#462) --- tests/dsp_tests/chowdsp_dsp_utils_test/GainTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/dsp_tests/chowdsp_dsp_utils_test/GainTest.cpp b/tests/dsp_tests/chowdsp_dsp_utils_test/GainTest.cpp index ab3d48d6d..1721e1ebc 100644 --- a/tests/dsp_tests/chowdsp_dsp_utils_test/GainTest.cpp +++ b/tests/dsp_tests/chowdsp_dsp_utils_test/GainTest.cpp @@ -78,12 +78,12 @@ TEMPLATE_TEST_CASE ("Gain Test", "[dsp][misc]", float, double, xsimd::batch ((T) 0), "Gain after prepare() is incorrect!"); + REQUIRE_MESSAGE (bufferData[0] == SIMDApprox ((T) 0).margin ((NumericType) 1.0e-6), "Gain after prepare() is incorrect!"); gain.setGainDecibels ((NumericType) 0); gain.reset(); std::fill (bufferData, bufferData + blockSize, (T) 1); gain.process (buffer); - REQUIRE_MESSAGE (bufferData[0] == SIMDApprox ((T) 1), "Gain after reset() is incorrect!"); + REQUIRE_MESSAGE (bufferData[0] == SIMDApprox ((T) 1).margin ((NumericType) 1.0e-6), "Gain after reset() is incorrect!"); } }