aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/ss/formula/eval
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2016-07-04 11:54:20 +0000
committerJaven O'Neal <onealj@apache.org>2016-07-04 11:54:20 +0000
commit5582593ad1f8712c7804e1d83bd5aea836ceb522 (patch)
treed88011b98ebabe59c05f8f77a26a09cf9958de88 /src/testcases/org/apache/poi/ss/formula/eval
parent8a9cb7c66b24d2e2fe1f71199a10cab9d62dbe7c (diff)
downloadpoi-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/eval')
-rw-r--r--src/testcases/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java10
-rw-r--r--src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java16
2 files changed, 13 insertions, 13 deletions
diff --git a/src/testcases/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java b/src/testcases/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java
index 8457a07d94..fb3b6a9288 100644
--- a/src/testcases/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java
+++ b/src/testcases/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java
@@ -174,7 +174,7 @@ public final class TestFormulasFromSpreadsheet {
// iterate across the row for all the evaluation cases
for (int colnum=SS.COLUMN_INDEX_FIRST_TEST_VALUE; colnum < endcolnum; colnum++) {
Cell c = formulasRow.getCell(colnum);
- if (c == null || c.getCellType() != CellType.FORMULA) {
+ if (c == null || c.getCellTypeEnum() != CellType.FORMULA) {
continue;
}
@@ -187,7 +187,7 @@ public final class TestFormulasFromSpreadsheet {
assertNotNull(msg + " - Bad setup data expected value is null", expValue);
assertNotNull(msg + " - actual value was null", actValue);
- final CellType cellType = expValue.getCellType();
+ final CellType cellType = expValue.getCellTypeEnum();
switch (cellType) {
case BLANK:
assertEquals(msg, CellType.BLANK, actValue.getCellType());
@@ -228,14 +228,14 @@ public final class TestFormulasFromSpreadsheet {
System.err.println("Warning - Row " + r.getRowNum() + " has no cell " + SS.COLUMN_INDEX_FUNCTION_NAME + ", can't figure out function name");
return null;
}
- if(cell.getCellType() == CellType.BLANK) {
+ if(cell.getCellTypeEnum() == CellType.BLANK) {
return null;
}
- if(cell.getCellType() == CellType.STRING) {
+ if(cell.getCellTypeEnum() == CellType.STRING) {
return cell.getRichStringCellValue().getString();
}
throw new AssertionFailedError("Bad cell type for 'function name' column: ("
- + cell.getCellType() + ") row (" + (r.getRowNum() +1) + ")");
+ + cell.getCellTypeEnum() + ") row (" + (r.getRowNum() +1) + ")");
}
}
diff --git a/src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java b/src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java
index bb9b6a85ba..429f5616e3 100644
--- a/src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java
+++ b/src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java
@@ -106,7 +106,7 @@ public final class TestMultiSheetEval extends TestCase {
throw new AssertionFailedError(msg + " - actual value was null");
}
- final CellType cellType = expected.getCellType();
+ final CellType cellType = expected.getCellTypeEnum();
switch (cellType) {
case BLANK:
@@ -231,7 +231,7 @@ public final class TestMultiSheetEval extends TestCase {
int result = Result.NO_EVALUATIONS_FOUND; // so far
Cell c = formulasRow.getCell(SS.COLUMN_INDEX_ACTUAL_VALUE);
- if (c == null || c.getCellType() != CellType.FORMULA) {
+ if (c == null || c.getCellTypeEnum() != CellType.FORMULA) {
return result;
}
@@ -300,15 +300,15 @@ public final class TestMultiSheetEval extends TestCase {
System.err.println("Warning - Row " + r.getRowNum() + " has no cell " + SS.COLUMN_INDEX_FUNCTION_NAME + ", can't figure out function name");
return null;
}
- if(cell.getCellType() == CellType.BLANK) {
+ if(cell.getCellTypeEnum() == CellType.BLANK) {
return null;
}
- if(cell.getCellType() == CellType.STRING) {
+ if(cell.getCellTypeEnum() == CellType.STRING) {
return cell.getRichStringCellValue().getString();
}
throw new AssertionFailedError("Bad cell type for 'function name' column: ("
- + cell.getCellType() + ") row (" + (r.getRowNum() +1) + ")");
+ + cell.getCellTypeEnum() + ") row (" + (r.getRowNum() +1) + ")");
}
/**
* @return <code>null</code> if cell is missing, empty or blank
@@ -323,15 +323,15 @@ public final class TestMultiSheetEval extends TestCase {
System.err.println("Warning - Row " + r.getRowNum() + " has no cell " + SS.COLUMN_INDEX_TEST_NAME + ", can't figure out test name");
return null;
}
- if(cell.getCellType() == CellType.BLANK) {
+ if(cell.getCellTypeEnum() == CellType.BLANK) {
return null;
}
- if(cell.getCellType() == CellType.STRING) {
+ if(cell.getCellTypeEnum() == CellType.STRING) {
return cell.getRichStringCellValue().getString();
}
throw new AssertionFailedError("Bad cell type for 'test name' column: ("
- + cell.getCellType() + ") row (" + (r.getRowNum() +1) + ")");
+ + cell.getCellTypeEnum() + ") row (" + (r.getRowNum() +1) + ")");
}
}