From edb93c4606e52a43b620abfe6b99dc74986714c2 Mon Sep 17 00:00:00 2001 From: David Fioramonti Date: Thu, 11 Apr 2019 04:35:27 -0700 Subject: 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. --- test/common/math.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/common/math.h b/test/common/math.h index 79c005206d..d523213f81 100644 --- a/test/common/math.h +++ b/test/common/math.h @@ -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 -- cgit v1.2.3