diff options
author | David Fioramonti | 2019-04-11 16:50:03 -0700 |
---|---|---|
committer | David Fioramonti | 2019-04-11 16:50:07 -0700 |
commit | cf0e9bfc1ba49726ef73acff028f74d97ee0e933 (patch) | |
tree | 4fc9cd7279b12df365a2a5a895c419d376bb64ca | |
parent | 9b993aed00a12aed6d13a233fa9a78c4241de97e (diff) | |
download | scummvm-rg350-cf0e9bfc1ba49726ef73acff028f74d97ee0e933.tar.gz scummvm-rg350-cf0e9bfc1ba49726ef73acff028f74d97ee0e933.tar.bz2 scummvm-rg350-cf0e9bfc1ba49726ef73acff028f74d97ee0e933.zip |
TESTS: further reduce precision for math tests
Since the math is doing subtraction on numbers around 360 and single
precision has about ~7 decimal digits of accuracy we can only
compare numbers to 360.0001 to be safe i'll use 1e-3.
-rw-r--r-- | test/common/math.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/common/math.h b/test/common/math.h index 7ed6a87ee4..0d70264c73 100644 --- a/test/common/math.h +++ b/test/common/math.h @@ -8,7 +8,7 @@ #define TS_ASSERT_ALMOST_EQUALS(x, y, z) \ TS_ASSERT_LESS_THAN_EQUALS(((x) - (y)) >= 0 ? (x) - (y) : (y) - (x), z) -const float MAX_ERROR = 0.00001; +const float MAX_ERROR = 0.001; class MathTestSuite : public CxxTest::TestSuite { public: |