[Scummvm-git-logs] scummvm master -> cf0e9bfc1ba49726ef73acff028f74d97ee0e933

dafioram dafioram at gmail.com
Fri Apr 12 01:53:22 CEST 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
cf0e9bfc1b TESTS: further reduce precision for math tests


Commit: cf0e9bfc1ba49726ef73acff028f74d97ee0e933
    https://github.com/scummvm/scummvm/commit/cf0e9bfc1ba49726ef73acff028f74d97ee0e933
Author: David Fioramonti (dafioram at gmail.com)
Date: 2019-04-11T16:50:07-07:00

Commit Message:
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.

Changed paths:
    test/common/math.h


diff --git a/test/common/math.h b/test/common/math.h
index 7ed6a87..0d70264 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:





More information about the Scummvm-git-logs mailing list