Author: fanningpj
Date: Sat Apr 9 13:38:27 2022
New Revision: 1899685
URL: http://svn.apache.org/viewvc?rev=1899685&view=rev
Log:
more test issues with rate change
Modified:
poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java
Modified:
poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java
URL:
http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java?rev=1899685&r1=1899684&r2=1899685&view=diff
==============================================================================
---
poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java
(original)
+++
poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java
Sat Apr 9 13:38:27 2022
@@ -213,10 +213,9 @@ public final class TestFormulaEvaluatorO
fail("Cannot expect formula as result of formula
evaluation: " + msg);
case NUMERIC:
assertEquals(CellType.NUMERIC, actValue.getCellType(),
msg);
- BaseTestNumeric.assertDouble(msg,
expValue.getNumericCellValue(), actValue.getNumberValue(),
BaseTestNumeric.POS_ZERO, BaseTestNumeric.DIFF_TOLERANCE_FACTOR);
-// double delta =
Math.abs(expValue.getNumericCellValue()-actValue.getNumberValue());
-// double pctExpValue =
Math.abs(0.00001*expValue.getNumericCellValue());
-// assertTrue(msg, delta <= pctExpValue);
+ final double tolerance =
targetFunctionName.equalsIgnoreCase("RATE")
+ ? 0.000001 : BaseTestNumeric.DIFF_TOLERANCE_FACTOR;
+ BaseTestNumeric.assertDouble(msg,
expValue.getNumericCellValue(), actValue.getNumberValue(),
BaseTestNumeric.POS_ZERO, tolerance);
break;
case STRING:
assertEquals(CellType.STRING, actValue.getCellType(), msg);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]