test/test_mixramp: add threshold to floating point comparisons
Fixes bogus test failures on Debian build machines due to rounding errors (hopefully).
This commit is contained in:
parent
b54762a8f6
commit
39257717d8
@ -28,18 +28,21 @@ public:
|
|||||||
free(foo);
|
free(foo);
|
||||||
|
|
||||||
foo = strdup(input);
|
foo = strdup(input);
|
||||||
CPPUNIT_ASSERT_EQUAL(float(0),
|
CPPUNIT_ASSERT_DOUBLES_EQUAL(float(0),
|
||||||
mixramp_interpolate(foo, 1));
|
mixramp_interpolate(foo, 1),
|
||||||
|
0.005);
|
||||||
free(foo);
|
free(foo);
|
||||||
|
|
||||||
foo = strdup(input);
|
foo = strdup(input);
|
||||||
CPPUNIT_ASSERT_EQUAL(float(0.1),
|
CPPUNIT_ASSERT_DOUBLES_EQUAL(float(0.1),
|
||||||
mixramp_interpolate(foo, 3));
|
mixramp_interpolate(foo, 3),
|
||||||
|
0.005);
|
||||||
free(foo);
|
free(foo);
|
||||||
|
|
||||||
foo = strdup(input);
|
foo = strdup(input);
|
||||||
CPPUNIT_ASSERT_EQUAL(float(2.5),
|
CPPUNIT_ASSERT_DOUBLES_EQUAL(float(2.5),
|
||||||
mixramp_interpolate(foo, 6));
|
mixramp_interpolate(foo, 6),
|
||||||
|
0.01);
|
||||||
free(foo);
|
free(foo);
|
||||||
|
|
||||||
foo = strdup(input);
|
foo = strdup(input);
|
||||||
|
Loading…
Reference in New Issue
Block a user