Add a few more little bits of formula unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1031077 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7c511c96c0
commit
3b5f224ccb
@ -114,6 +114,7 @@ public final class TestXSSFCell extends BaseTestCell {
|
|||||||
|
|
||||||
cell.setCellFormula("A2");
|
cell.setCellFormula("A2");
|
||||||
assertEquals(XSSFCell.CELL_TYPE_FORMULA, cell.getCellType());
|
assertEquals(XSSFCell.CELL_TYPE_FORMULA, cell.getCellType());
|
||||||
|
assertEquals("A2", cell.getCellFormula());
|
||||||
//the value is not set and cell's type='N' which means blank
|
//the value is not set and cell's type='N' which means blank
|
||||||
assertEquals(STCellType.N, ctCell.getT());
|
assertEquals(STCellType.N, ctCell.getT());
|
||||||
|
|
||||||
@ -121,6 +122,7 @@ public final class TestXSSFCell extends BaseTestCell {
|
|||||||
cell.setCellValue("t='str'");
|
cell.setCellValue("t='str'");
|
||||||
//we are still of 'formula' type
|
//we are still of 'formula' type
|
||||||
assertEquals(XSSFCell.CELL_TYPE_FORMULA, cell.getCellType());
|
assertEquals(XSSFCell.CELL_TYPE_FORMULA, cell.getCellType());
|
||||||
|
assertEquals("A2", cell.getCellFormula());
|
||||||
//cached formula value is set and cell's type='STR'
|
//cached formula value is set and cell's type='STR'
|
||||||
assertEquals(STCellType.STR, ctCell.getT());
|
assertEquals(STCellType.STR, ctCell.getT());
|
||||||
assertEquals("t='str'", cell.getStringCellValue());
|
assertEquals("t='str'", cell.getStringCellValue());
|
||||||
|
Loading…
Reference in New Issue
Block a user