Skip to content

Commit

Permalink
Interpolate: removing interpolateAndTest functions that are no longer…
Browse files Browse the repository at this point in the history
… used. see issue #56
  • Loading branch information
nwolek committed Dec 25, 2015
1 parent 65e781a commit 3a05941
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions test/Interpolation/Interpolation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,6 @@ class InterpolationTest {
}


template <class InterpolationType>
auto interpolateAndTest(Jamoma::Sample x0, Jamoma::Sample x1, Jamoma::Sample aDelta, Jamoma::Sample anExpectedValue) {
InterpolationType interpolator;
auto interpolatedValue = interpolator(x0, x1, aDelta);
auto result = mTest->compare(interpolatedValue , anExpectedValue);

if (result == false)
mTest->log("BAD INTERPOLATION @ delta=%.5f ( value=%.10f expected=%.10f )", aDelta, interpolatedValue, anExpectedValue);
return result;
}

// TODO: way to make a single function template that is variadic?
template <class InterpolationType>
auto interpolateAndTest(float x0, float x1,float x2, float x3, float aDelta, float anExpectedValue) {
InterpolationType interpolator;
auto interpolatedValue = interpolator(x0, x1, x2, x3, aDelta);
auto result = mTest->compare(interpolatedValue , anExpectedValue);

if (result == false)
mTest->log("BAD INTERPOLATION @ delta=%.5f ( value=%.10f expected=%.10f )", aDelta, interpolatedValue, anExpectedValue);
return result;
}



void testLinear() {
int badSampleCount = 0;
Jamoma::Interpolation::Linear<Jamoma::Sample> my_interp;
Expand Down

0 comments on commit 3a05941

Please sign in to comment.