You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2014/07/03 16:30:48 UTC

svn commit: r1607661 - in /poi/trunk: src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java test-data/spreadsheet/56420.xlsx

Author: nick
Date: Thu Jul  3 14:30:47 2014
New Revision: 1607661

URL: http://svn.apache.org/r1607661
Log:
Add a disabled unit test for bug #56420

Added:
    poi/trunk/test-data/spreadsheet/56420.xlsx   (with props)
Modified:
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java?rev=1607661&r1=1607660&r2=1607661&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java Thu Jul  3 14:30:47 2014
@@ -1565,6 +1565,23 @@ public final class TestXSSFBugs extends 
         File xlsOutput = TempFile.createTempFile("testBug53798", ".xls");
         bug53798Work(wb, xlsOutput);
     }
+    
+    /**
+     * SUMIF was throwing a NPE on some formulas
+     */
+    @Test
+    @Ignore("This bug is still to be fixed")
+    public void testBug56420SumIfNPE() throws Exception {
+        XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("56420.xlsx");
+        
+        FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator();
+
+        Sheet sheet = wb.getSheetAt(0);
+        Row r = sheet.getRow(2);
+        Cell c = r.getCell(2);
+        assertEquals("SUMIF($A$1:$A$4,A3,$B$1:$B$4)", c.getCellFormula());
+        evaluator.evaluateInCell(c);
+    }
 
     private void bug53798Work(Workbook wb, File xlsOutput) throws IOException {
         Sheet testSheet = wb.getSheetAt(0);

Added: poi/trunk/test-data/spreadsheet/56420.xlsx
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/56420.xlsx?rev=1607661&view=auto
==============================================================================
Binary file - no diff available.

Propchange: poi/trunk/test-data/spreadsheet/56420.xlsx
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



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