aboutsummaryrefslogtreecommitdiff
path: root/test/common
diff options
context:
space:
mode:
authorDavid Fioramonti2019-04-11 16:50:03 -0700
committerDavid Fioramonti2019-04-11 16:50:07 -0700
commitcf0e9bfc1ba49726ef73acff028f74d97ee0e933 (patch)
tree4fc9cd7279b12df365a2a5a895c419d376bb64ca /test/common
parent9b993aed00a12aed6d13a233fa9a78c4241de97e (diff)
downloadscummvm-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.
Diffstat (limited to 'test/common')
-rw-r--r--test/common/math.h2
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: