diff options
author | Javen O'Neal <onealj@apache.org> | 2016-07-04 11:54:20 +0000 |
---|---|---|
committer | Javen O'Neal <onealj@apache.org> | 2016-07-04 11:54:20 +0000 |
commit | 5582593ad1f8712c7804e1d83bd5aea836ceb522 (patch) | |
tree | d88011b98ebabe59c05f8f77a26a09cf9958de88 /src/testcases/org/apache/poi/ss/formula/atp | |
parent | 8a9cb7c66b24d2e2fe1f71199a10cab9d62dbe7c (diff) | |
download | poi-5582593ad1f8712c7804e1d83bd5aea836ceb522.tar.gz poi-5582593ad1f8712c7804e1d83bd5aea836ceb522.zip |
bug 59791: getCellType and getCachedFormulaResultType should return an integer for backwards compatibility
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751256 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/ss/formula/atp')
-rw-r--r-- | src/testcases/org/apache/poi/ss/formula/atp/TestRandBetween.java | 10 | ||||
-rw-r--r-- | src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/testcases/org/apache/poi/ss/formula/atp/TestRandBetween.java b/src/testcases/org/apache/poi/ss/formula/atp/TestRandBetween.java index 802b7d8b33..1ddf81ef52 100644 --- a/src/testcases/org/apache/poi/ss/formula/atp/TestRandBetween.java +++ b/src/testcases/org/apache/poi/ss/formula/atp/TestRandBetween.java @@ -131,7 +131,7 @@ public class TestRandBetween extends TestCase { formulaCell.setCellFormula("RANDBETWEEN($A$1,$B$1)"); evaluator.clearAllCachedResultValues(); evaluator.evaluateFormulaCell(formulaCell); - assertEquals(CellType.ERROR, formulaCell.getCachedFormulaResultType()); + assertEquals(CellType.ERROR, formulaCell.getCachedFormulaResultTypeEnum()); assertEquals(ErrorEval.VALUE_INVALID.getErrorCode(), formulaCell.getErrorCellValue()); @@ -141,7 +141,7 @@ public class TestRandBetween extends TestCase { formulaCell.setCellFormula("RANDBETWEEN($A$1,$B$1)"); evaluator.clearAllCachedResultValues(); evaluator.evaluateFormulaCell(formulaCell); - assertEquals(CellType.ERROR, formulaCell.getCachedFormulaResultType()); + assertEquals(CellType.ERROR, formulaCell.getCachedFormulaResultTypeEnum()); assertEquals(ErrorEval.VALUE_INVALID.getErrorCode(), formulaCell.getErrorCellValue()); // Check case where both inputs are of wrong type @@ -150,7 +150,7 @@ public class TestRandBetween extends TestCase { formulaCell.setCellFormula("RANDBETWEEN($A$1,$B$1)"); evaluator.clearAllCachedResultValues(); evaluator.evaluateFormulaCell(formulaCell); - assertEquals(CellType.ERROR, formulaCell.getCachedFormulaResultType()); + assertEquals(CellType.ERROR, formulaCell.getCachedFormulaResultTypeEnum()); assertEquals(ErrorEval.VALUE_INVALID.getErrorCode(), formulaCell.getErrorCellValue()); } @@ -166,14 +166,14 @@ public class TestRandBetween extends TestCase { formulaCell.setCellFormula("RANDBETWEEN($A$1,$B$1)"); evaluator.clearAllCachedResultValues(); evaluator.evaluateFormulaCell(formulaCell); - assertEquals(CellType.ERROR, formulaCell.getCachedFormulaResultType()); + assertEquals(CellType.ERROR, formulaCell.getCachedFormulaResultTypeEnum()); assertEquals(ErrorEval.NUM_ERROR.getErrorCode(), formulaCell.getErrorCellValue()); bottomValueCell.setCellValue(1); topValueCell.setCellType(CellType.BLANK); formulaCell.setCellFormula("RANDBETWEEN($A$1,$B$1)"); evaluator.clearAllCachedResultValues(); evaluator.evaluateFormulaCell(formulaCell); - assertEquals(CellType.ERROR, formulaCell.getCachedFormulaResultType()); + assertEquals(CellType.ERROR, formulaCell.getCachedFormulaResultTypeEnum()); assertEquals(ErrorEval.NUM_ERROR.getErrorCode(), formulaCell.getErrorCellValue()); } diff --git a/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java b/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java index f52d0728e6..f683e5dbf7 100644 --- a/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java +++ b/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java @@ -63,7 +63,7 @@ public final class TestYearFracCalculatorFromSpreadsheet { HSSFRow row = (HSSFRow) rowIterator.next(); HSSFCell cell = row.getCell(SS.YEARFRAC_FORMULA_COLUMN); - if (cell == null || cell.getCellType() != CellType.FORMULA) { + if (cell == null || cell.getCellTypeEnum() != CellType.FORMULA) { continue; } processRow(row, cell, formulaEvaluator); |