Skip to content

Commit

Permalink
Add missing margins for Gain Test (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 authored Oct 13, 2023
1 parent 3d428e5 commit 01d644a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/dsp_tests/chowdsp_dsp_utils_test/GainTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ TEMPLATE_TEST_CASE ("Gain Test", "[dsp][misc]", float, double, xsimd::batch<floa

std::fill (bufferData, bufferData + blockSize, (T) 1);
gain.process (buffer);
REQUIRE_MESSAGE (bufferData[0] == SIMDApprox<T> ((T) 0), "Gain after prepare() is incorrect!");
REQUIRE_MESSAGE (bufferData[0] == SIMDApprox<T> ((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> ((T) 1), "Gain after reset() is incorrect!");
REQUIRE_MESSAGE (bufferData[0] == SIMDApprox<T> ((T) 1).margin ((NumericType) 1.0e-6), "Gain after reset() is incorrect!");
}
}

0 comments on commit 01d644a

Please sign in to comment.