poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1757237 - /poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
Date Mon, 22 Aug 2016 18:14:47 GMT
Author: onealj
Date: Mon Aug 22 18:14:46 2016
New Revision: 1757237

URL: http://svn.apache.org/viewvc?rev=1757237&view=rev
Log:
bug 59791: make sure hard-coded int literals work for cell type

Modified:
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java

Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java?rev=1757237&r1=1757236&r2=1757237&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java Mon Aug 22 18:14:46
2016
@@ -1030,6 +1030,7 @@ public abstract class BaseTestCell {
         // Cell.CELL_TYPE_* -> CellType.*
         cell.setCellValue(5.0);
         assertEquals(Cell.CELL_TYPE_NUMERIC, cell.getCellType());
+        assertEquals(0, cell.getCellType()); //make sure that hard-coded int literals still
work, even though users should be using the named constants
         assertEquals(CellType.NUMERIC, cell.getCellTypeEnum()); // make sure old way and
new way are compatible
 
         // make sure switch(int|Enum) still works. Cases must be statically resolvable in
Java 6 ("constant expression required")
@@ -1038,6 +1039,7 @@ public abstract class BaseTestCell {
                 // expected
                 break;
             case Cell.CELL_TYPE_STRING:
+            case Cell.CELL_TYPE_BOOLEAN:
             case Cell.CELL_TYPE_ERROR:
             case Cell.CELL_TYPE_FORMULA:
             case Cell.CELL_TYPE_BLANK:



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message