TESTS: Use Less than or equal to for math tests

This should fix debian build.

Its seems the precision that debian is using is rounding the
error delta to zero so that the actual error is not less than
this.
This commit is contained in:
David Fioramonti 2019-04-11 04:35:27 -07:00
parent ce8227323b
commit edb93c4606

View file

@ -6,7 +6,7 @@
// aren't further apart from each other than z.
#define TS_ASSERT_ALMOST_EQUALS(x, y, z) \
TS_ASSERT_LESS_THAN(((x) - (y)) >= 0 ? (x) - (y) : (y) - (x), z)
TS_ASSERT_LESS_THAN_EQUALS(((x) - (y)) >= 0 ? (x) - (y) : (y) - (x), z)
const float MAX_ERROR = 0.000001;
class MathTestSuite : public CxxTest::TestSuite