diff options
author | Josh Micich <josh@apache.org> | 2009-02-02 23:53:22 +0000 |
---|---|---|
committer | Josh Micich <josh@apache.org> | 2009-02-02 23:53:22 +0000 |
commit | 7df009dfd998e34286aef2d33ca10de94dfe51ce (patch) | |
tree | 7efa361c4f593b99893f15f8cfce93c06d42631b /src/testcases | |
parent | abdf3c9c46982d67045eced1b009bbcaa152b692 (diff) | |
download | poi-7df009dfd998e34286aef2d33ca10de94dfe51ce.tar.gz poi-7df009dfd998e34286aef2d33ca10de94dfe51ce.zip |
Modified formula parser to encode SUM taking a single argument as tAttrSum (from comment 7 of bugzilla 46643)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@740159 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases')
-rw-r--r-- | src/testcases/org/apache/poi/hssf/model/TestFormulaParserEval.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/testcases/org/apache/poi/hssf/model/TestFormulaParserEval.java b/src/testcases/org/apache/poi/hssf/model/TestFormulaParserEval.java index 48be912292..fc93a34782 100644 --- a/src/testcases/org/apache/poi/hssf/model/TestFormulaParserEval.java +++ b/src/testcases/org/apache/poi/hssf/model/TestFormulaParserEval.java @@ -20,7 +20,7 @@ package org.apache.poi.hssf.model; import junit.framework.AssertionFailedError; import junit.framework.TestCase; -import org.apache.poi.hssf.record.formula.FuncVarPtg; +import org.apache.poi.hssf.record.formula.AttrPtg; import org.apache.poi.hssf.record.formula.NamePtg; import org.apache.poi.hssf.record.formula.Ptg; import org.apache.poi.hssf.usermodel.HSSFCell; @@ -58,9 +58,8 @@ public final class TestFormulaParserEval extends TestCase { confirmParseFormula(workbook); // And make it non-contiguous - if (false) { // TODO (Nov 2008) - make the formula parser support area unions - name.setReference("A1:A2,C3"); - } + // using area unions + name.setReference("A1:A2,C3"); confirmParseFormula(workbook); } @@ -72,7 +71,7 @@ public final class TestFormulaParserEval extends TestCase { Ptg[] ptgs = HSSFFormulaParser.parse("SUM(testName)", workbook); assertTrue("two tokens expected, got "+ptgs.length,ptgs.length == 2); assertEquals(NamePtg.class, ptgs[0].getClass()); - assertEquals(FuncVarPtg.class, ptgs[1].getClass()); + assertEquals(AttrPtg.class, ptgs[1].getClass()); } public void testEvaluateFormulaWithRowBeyond32768_Bug44539() { |