]> source.dussan.org Git - poi.git/commitdiff
Add a few more little bits of formula unit tests
authorNick Burch <nick@apache.org>
Thu, 4 Nov 2010 16:55:36 +0000 (16:55 +0000)
committerNick Burch <nick@apache.org>
Thu, 4 Nov 2010 16:55:36 +0000 (16:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1031077 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java

index bd7319e5f3a8c2a9c398b000644908c2d4baf8ae..0691363566b6ff0aadb450b29b957290de08c1e6 100644 (file)
@@ -114,6 +114,7 @@ public final class TestXSSFCell extends BaseTestCell {
 
         cell.setCellFormula("A2");
         assertEquals(XSSFCell.CELL_TYPE_FORMULA, cell.getCellType());
+        assertEquals("A2", cell.getCellFormula());
         //the value is not set and cell's type='N' which means blank
         assertEquals(STCellType.N, ctCell.getT());
 
@@ -121,6 +122,7 @@ public final class TestXSSFCell extends BaseTestCell {
         cell.setCellValue("t='str'");
         //we are still of 'formula' type
         assertEquals(XSSFCell.CELL_TYPE_FORMULA, cell.getCellType());
+        assertEquals("A2", cell.getCellFormula());
         //cached formula value is set and cell's type='STR'
         assertEquals(STCellType.STR, ctCell.getT());
         assertEquals("t='str'", cell.getStringCellValue());