You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2021/07/30 10:59:09 UTC
svn commit: r1891895 -
/poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestSumif.java
Author: fanningpj
Date: Fri Jul 30 10:59:09 2021
New Revision: 1891895
URL: http://svn.apache.org/viewvc?rev=1891895&view=rev
Log:
fix issue with test
Modified:
poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestSumif.java
Modified: poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestSumif.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestSumif.java?rev=1891895&r1=1891894&r2=1891895&view=diff
==============================================================================
--- poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestSumif.java (original)
+++ poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestSumif.java Fri Jul 30 10:59:09 2021
@@ -110,7 +110,7 @@ final class TestSumif {
void testMicrosoftExample1() throws IOException {
try (HSSFWorkbook wb = initWorkbook1()) {
HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb);
- HSSFCell cell = wb.getSheetAt(0).createRow(5).createCell(0);
+ HSSFCell cell = wb.getSheetAt(0).getRow(0).createCell(100);
confirmDouble(fe, cell, "SUMIF(A2:A5,\">160000\",B2:B5)", 63000);
confirmDouble(fe, cell, "SUMIF(A2:A5,\">160000\")", 900000);
confirmDouble(fe, cell, "SUMIF(A2:A5,300000,B2:B5)", 21000);
@@ -123,7 +123,7 @@ final class TestSumif {
void testMicrosoftExample1WithNA() throws IOException {
try (HSSFWorkbook wb = initWorkbook1WithNA()) {
HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb);
- HSSFCell cell = wb.getSheetAt(0).createRow(5).createCell(0);
+ HSSFCell cell = wb.getSheetAt(0).getRow(0).createCell(100);
confirmError(fe, cell, "SUMIF(A2:A6,\">160000\",B2:B6)", FormulaError.NA);
}
}
@@ -132,10 +132,9 @@ final class TestSumif {
void testMicrosoftExample2() throws IOException {
try (HSSFWorkbook wb = initWorkbook2()) {
HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb);
- HSSFCell cell = wb.getSheetAt(0).createRow(5).createCell(0);
+ HSSFCell cell = wb.getSheetAt(0).getRow(0).createCell(100);
confirmDouble(fe, cell, "SUMIF(A2:A7,\"Fruits\",C2:C7)", 2000);
- //next test is broken and needs investigation
- //confirmDouble(fe, cell, "SUMIF(A2:A7,\"Vegetables\",C2:C7)", 12000);
+ confirmDouble(fe, cell, "SUMIF(A2:A7,\"Vegetables\",C2:C7)", 12000);
confirmDouble(fe, cell, "SUMIF(B2:B7,\"*es\",C2:C7)", 4300);
confirmDouble(fe, cell, "SUMIF(A2:A7,\"\",C2:C7)", 400);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org