Failing Test Requiring Too Much Precision (#2647)
The new array tests for IMCSC fail on my system because of a rounding error in the 14th (!) decimal position. This is not a real failure. Change the test to use only the first 8 decimal positions.
This commit is contained in:
parent
a7a48bf0ca
commit
e87be5e16d
|
|
@ -52,6 +52,18 @@ class ImCscTest extends TestCase
|
||||||
|
|
||||||
$formula = "=IMCSC({$complex})";
|
$formula = "=IMCSC({$complex})";
|
||||||
$result = $calculation->_calculateFormulaValue($formula);
|
$result = $calculation->_calculateFormulaValue($formula);
|
||||||
|
// Avoid testing for excess precision
|
||||||
|
foreach ($expectedResult as &$array) {
|
||||||
|
foreach ($array as &$string) {
|
||||||
|
$string = preg_replace('/(\\d{8})\\d+/', '$1', $string);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach ($result as &$array) {
|
||||||
|
foreach ($array as &$string) {
|
||||||
|
$string = preg_replace('/(\\d{8})\\d+/', '$1', $string);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
self::assertEquals($expectedResult, $result);
|
self::assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue